summaryrefslogtreecommitdiffstats
path: root/abs/extra/network-ups-tools/finish.upsd
blob: 8eb335b63151e8ab0fa5215754bb455f5ddbecb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

PID=`pidof -o %PPID /usr/sbin/upsd`
     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