added presets

This commit is contained in:
2026-06-25 15:28:46 +03:00
parent db5f174ef3
commit 84a007f9d0
106 changed files with 6250 additions and 36 deletions
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
#
# bt-service - restart/start/stop the ButtonTask systemd units.
# Invoked through sudo by the web configurator (tightly scoped).
set -euo pipefail
ACTION="${1:-}"
if [ -z "${BT_SERVICE_DETACHED:-}" ]; then
unit="buttontask-service-$(date +%s)"
exec systemd-run --no-block --collect \
"--unit=${unit}" \
"--setenv=BT_SERVICE_DETACHED=1" \
"$0" "$@"
fi
case "$ACTION" in
start|stop|restart)
systemctl "$ACTION" buttontask-web buttontask
;;
*)
echo "usage: bt-service {start|stop|restart}" >&2
exit 2
;;
esac