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
@@ -63,7 +63,8 @@ padcontroller/systemd/install.sh
|
|||||||
```
|
```
|
||||||
|
|
||||||
Options after the command go to the pad controller (for example `--lock-knobs`).
|
Options after the command go to the pad controller (for example `--lock-knobs`).
|
||||||
`--uninstall` removes the service. Logs: `journalctl --user -u padcontroller -f`.
|
`--no-enable` installs it without starting it at login (start it with
|
||||||
|
`systemctl --user start padcontroller`). `--uninstall` removes the service. Logs: `journalctl --user -u padcontroller -f`.
|
||||||
|
|
||||||
## Chataigne
|
## Chataigne
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
#
|
#
|
||||||
# padcontroller/systemd/install.sh # install, enable, start
|
# padcontroller/systemd/install.sh # install, enable, start
|
||||||
# padcontroller/systemd/install.sh --lock-knobs # pass options to the pad controller
|
# 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
|
# padcontroller/systemd/install.sh --uninstall
|
||||||
#
|
#
|
||||||
# Logs: journalctl --user -u padcontroller -f
|
# Logs: journalctl --user -u padcontroller -f
|
||||||
@@ -28,12 +30,25 @@ PYTHON="$ROOT/.venv/bin/python"
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ENABLE=1
|
||||||
|
if [[ "${1:-}" == "--no-enable" ]]; then
|
||||||
|
ENABLE=
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
ARGS="$*"
|
ARGS="$*"
|
||||||
mkdir -p "$DEST"
|
mkdir -p "$DEST"
|
||||||
sed -e "s|@ROOT@|$ROOT|g" -e "s|@PYTHON@|$PYTHON|g" -e "s|@ARGS@|$ARGS|g" \
|
sed -e "s|@ROOT@|$ROOT|g" -e "s|@PYTHON@|$PYTHON|g" -e "s|@ARGS@|$ARGS|g" \
|
||||||
"$HERE/$UNIT" >"$DEST/$UNIT"
|
"$HERE/$UNIT" >"$DEST/$UNIT"
|
||||||
|
|
||||||
systemctl --user daemon-reload
|
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 enable "$UNIT"
|
||||||
systemctl --user restart "$UNIT"
|
systemctl --user restart "$UNIT"
|
||||||
echo "Installed $DEST/$UNIT and started it."
|
echo "Installed $DEST/$UNIT and started it."
|
||||||
|
|||||||
Reference in new issue
Block a user