feat: add shared PostgreSQL fnOS service and refresh UI

This commit is contained in:
2026-08-02 20:14:39 +08:00
parent de9f5ae110
commit e5b50ea85c
52 changed files with 3577 additions and 338 deletions
+13
View File
@@ -1,2 +1,15 @@
#!/bin/bash
set -eu
TOKEN="${wizard_postgres_enrollment_token:-}"
unset wizard_postgres_enrollment_token
if [ -n "$TOKEN" ]; then
[ "${#TOKEN}" -ge 20 ] || { printf '%s\n' "PostgreSQL 应用接入令牌至少需要 20 个字符。" >&2; exit 1; }
case "$TOKEN" in
*$'\n'*|*$'\r'*) printf '%s\n' "PostgreSQL 应用接入令牌不能包含换行符。" >&2; exit 1 ;;
esac
umask 077
printf '%s\n' "$TOKEN" >"${TRIM_PKGVAR}/postgres-enrollment-token.seed"
fi
unset TOKEN
exit 0