Update install-pingfinder.sh
This commit is contained in:
parent
a374eb0b9b
commit
7d99750d1a
1 changed files with 8 additions and 1 deletions
|
|
@ -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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue