summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/community/network-ups-tools/finish
blob: d031d4e12492dbdac82a26125000e60a8e3381cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/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