Update install-pingfinder.sh

This commit is contained in:
Minecon724 2025-08-10 11:50:30 +02:00
commit 7d99750d1a

View file

@ -1,8 +1,14 @@
#!/bin/sh #!/bin/sh
set -euo pipefail set -euo pipefail
if ! systemd-notify --booted; then
echo "Systemd is required"
exit 1
fi
if ! [ $(id -u) = 0 ]; then if ! [ $(id -u) = 0 ]; then
echo "Run this as root!" echo "Must be run as root"
exit 1 exit 1
fi 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 cp usr/local/bin/pingfinder.sh /usr/local/bin/pingfinder.sh
chmod +x /usr/local/bin/pingfinder.sh chmod +x /usr/local/bin/pingfinder.sh
systemctl daemon-reload
systemctl enable pingfinder.timer systemctl enable pingfinder.timer