diff options
Diffstat (limited to 'abs/extra-testing/community/network-ups-tools/run.upsd')
-rw-r--r-- | abs/extra-testing/community/network-ups-tools/run.upsd | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/abs/extra-testing/community/network-ups-tools/run.upsd b/abs/extra-testing/community/network-ups-tools/run.upsd index b0a02a3..83be88d 100644 --- a/abs/extra-testing/community/network-ups-tools/run.upsd +++ b/abs/extra-testing/community/network-ups-tools/run.upsd @@ -3,7 +3,19 @@ . /etc/rc.conf . /etc/rc.d/functions -svwaitup 3 /var/service/upsdrvctl || exit 1 +PID=`pidof -o %PPID /usr/sbin/upsd` stat_runit "Starting UPSd Daemon" - exec /usr/bin/upsd -D &> /dev/null + /usr/bin/upsdrvctl start &> /dev/null + [ -z "$PID" ] && /usr/sbin/upsd &>/dev/null + /usr/sbin/upsmon &>/dev/null + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon upsd + stat_done + fi + + while [ -n $PID ] ; do + sleep 60 + done |