diff --git a/etc/rc.local b/etc/rc.local index b660de8..ed1f09f 100755 --- a/etc/rc.local +++ b/etc/rc.local @@ -4,4 +4,4 @@ # This is run by runit in stage 2 before the services are executed # (see /etc/runit/2). -[[ -x /opt/bin/pushover-client ]] && /opt/bin/pushover-client -p -1 -m "Boot up: ${HOSTNAME%%.*}" +( sleep 10; [[ -x /opt/bin/pushover-client ]] && /opt/bin/pushover-client -p -1 -m "Boot up: ${HOSTNAME%%.*}" ) & diff --git a/etc/rc.shutdown b/etc/rc.shutdown index 34a327c..51e9383 100755 --- a/etc/rc.shutdown +++ b/etc/rc.shutdown @@ -4,4 +4,8 @@ # This is run by runit in stage 3 after the services are stopped # (see /etc/runit/3). -[[ -x /opt/bin/pushover-client ]] && /opt/bin/pushover-client -p -1 -m "Shutting down: ${HOSTNAME%%.*}" +[[ ! -e /run/rc-shutdown-ran ]] && { + [[ -x /opt/bin/pushover-client ]] && /opt/bin/pushover-client -p -1 -m "Shutting down: ${HOSTNAME%%.*}" + + toch /run/rc-shutdown-ran +} diff --git a/etc/runit/shutdown.d/00-rc-shutdown.sh b/etc/runit/shutdown.d/00-rc-shutdown.sh new file mode 100644 index 0000000..1df105b --- /dev/null +++ b/etc/runit/shutdown.d/00-rc-shutdown.sh @@ -0,0 +1 @@ +[ -x /etc/rc.shutdown ] && /etc/rc.shutdown