first commit

This commit is contained in:
Mateusz Gruszczyński
2026-08-23 21:34:07 +02:00
commit 1d3dcba1a9
62 changed files with 12456 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -Eeuo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=common.sh
source "$SCRIPT_DIR/common.sh"
action="${1:-status}"
case "$action" in
start|stop|restart)
require_root
systemctl "$action" "$SERVICE_NAME"
;;
status)
systemctl --no-pager --full status "$SERVICE_NAME"
;;
logs)
exec journalctl -u "$SERVICE_NAME" -f
;;
health)
curl -fsS "$(health_url)"; printf '\n'
;;
*)
echo "Usage: $0 {start|stop|restart|status|logs|health}" >&2
exit 2
;;
esac