summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/community/network-ups-tools/finish.upsd
diff options
context:
space:
mode:
Diffstat (limited to 'abs/extra-testing/community/network-ups-tools/finish.upsd')
-rw-r--r--abs/extra-testing/community/network-ups-tools/finish.upsd14
1 files changed, 10 insertions, 4 deletions
diff --git a/abs/extra-testing/community/network-ups-tools/finish.upsd b/abs/extra-testing/community/network-ups-tools/finish.upsd
index 4596ff1..8eb335b 100644
--- a/abs/extra-testing/community/network-ups-tools/finish.upsd
+++ b/abs/extra-testing/community/network-ups-tools/finish.upsd
@@ -3,8 +3,14 @@
. /etc/rc.conf
. /etc/rc.d/functions
-svwaitdown -t 3 -k /var/service/upsdrvctl /var/service/upsmon || exit 1
-
PID=`pidof -o %PPID /usr/sbin/upsd`
- stat_runit "Stopping UPSd Daemon"
- [ ! -z "$PID" ] && kill $PID &> /dev/null
+ stat_runit "Stopping UPSd Daemon"
+ /usr/bin/upsdrvctl stop &> /dev/null
+ /usr/sbin/upsmon -c stop &> /dev/null
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon upsd
+ stat_done
+ fi