Let the padcontroller installer install the service without enabling it at login.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9742121144
commit
20f018a523
2 files changed
+17
-1
No files matched your search
@@ -3,6 +3,8 @@
|
||||
#
|
||||
# padcontroller/systemd/install.sh # install, enable, start
|
||||
# padcontroller/systemd/install.sh --lock-knobs # pass options to the pad controller
|
||||
# padcontroller/systemd/install.sh --no-enable # install only; start it with
|
||||
# # systemctl --user start padcontroller
|
||||
# padcontroller/systemd/install.sh --uninstall
|
||||
#
|
||||
# Logs: journalctl --user -u padcontroller -f
|
||||
@@ -28,12 +30,25 @@ PYTHON="$ROOT/.venv/bin/python"
|
||||
exit 1
|
||||
}
|
||||
|
||||
ENABLE=1
|
||||
if [[ "${1:-}" == "--no-enable" ]]; then
|
||||
ENABLE=
|
||||
shift
|
||||
fi
|
||||
|
||||
ARGS="$*"
|
||||
mkdir -p "$DEST"
|
||||
sed -e "s|@ROOT@|$ROOT|g" -e "s|@PYTHON@|$PYTHON|g" -e "s|@ARGS@|$ARGS|g" \
|
||||
"$HERE/$UNIT" >"$DEST/$UNIT"
|
||||
|
||||
systemctl --user daemon-reload
|
||||
if [[ -z "$ENABLE" ]]; then
|
||||
# Undo an earlier enable, so it does not start at login here.
|
||||
systemctl --user disable "$UNIT" 2>/dev/null || true
|
||||
echo "Installed $DEST/$UNIT. It does not start at login."
|
||||
echo "Start it with: systemctl --user start padcontroller"
|
||||
exit 0
|
||||
fi
|
||||
systemctl --user enable "$UNIT"
|
||||
systemctl --user restart "$UNIT"
|
||||
echo "Installed $DEST/$UNIT and started it."
|
||||
|
||||
Reference in new issue
Block a user