Add scripts/update-systemd as a safer routine deploy entrypoint for native systemd installations. The wrapper keeps updates non-interactive, preserves the existing environment file, skips OS package installation, and avoids superuser creation prompts while still reusing the installer refresh flow. Document the update path in the README and capture the maintenance expectation in the development notes.
42 lines
966 B
Bash
Executable File
42 lines
966 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|
|
|
show_help() {
|
|
cat <<'EOF'
|
|
Usage: sudo scripts/update-systemd [options]
|
|
|
|
Refresh an existing native pobsync systemd install from the current checkout.
|
|
|
|
This is a thin, safer update wrapper around scripts/install-systemd. It keeps
|
|
the install non-interactive, preserves the existing environment file, skips
|
|
superuser creation, and skips OS package installation by default.
|
|
|
|
Common options are forwarded to install-systemd, for example:
|
|
--source-dir PATH
|
|
--app-dir PATH
|
|
--venv-dir PATH
|
|
--env-file PATH
|
|
--service-user USER
|
|
--service-group GROUP
|
|
--install-extras mariadb
|
|
--verbose
|
|
|
|
If OS packages need to be refreshed, run scripts/install-systemd directly.
|
|
EOF
|
|
}
|
|
|
|
case "${1:-}" in
|
|
-h|--help)
|
|
show_help
|
|
exit 0
|
|
;;
|
|
esac
|
|
|
|
exec "$SCRIPT_DIR/install-systemd" \
|
|
--non-interactive \
|
|
--no-install-os-packages \
|
|
--no-create-superuser \
|
|
"$@"
|