From 7d99750d1abe292702e2832a5254cc92b1d448ef Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Sun, 10 Aug 2025 11:50:30 +0200 Subject: [PATCH] Update install-pingfinder.sh --- install-pingfinder.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/install-pingfinder.sh b/install-pingfinder.sh index 68c8486..50d90f4 100644 --- a/install-pingfinder.sh +++ b/install-pingfinder.sh @@ -1,8 +1,14 @@ #!/bin/sh set -euo pipefail +if ! systemd-notify --booted; then + echo "Systemd is required" + exit 1 +fi + + if ! [ $(id -u) = 0 ]; then - echo "Run this as root!" + echo "Must be run as root" exit 1 fi @@ -13,4 +19,5 @@ cp etc/systemd/system/pingfinder.timer /etc/systemd/system/pingfinder.timer cp usr/local/bin/pingfinder.sh /usr/local/bin/pingfinder.sh chmod +x /usr/local/bin/pingfinder.sh +systemctl daemon-reload systemctl enable pingfinder.timer \ No newline at end of file