9 test x
"${upsd:-NO}" = x
"NO" && exit 0
10 test x
"$upsd" = x
"DAEMON" && test -x /bin
/mksh
&& exec mksh
-T- $0 start
14 [ -d /var
/state
/ups
] || mkdir
-p /var
/state
/ups
15 /usr
/bin
/upsdrvctl start ||
exit 1
16 /usr
/sbin
/upsd ||
exit 2
19 /usr
/sbin
/upsd
-c stop ||
kill $
(pgrep
-f /usr
/sbin
/upsd
)
20 /usr
/bin
/upsdrvctl stop
28 echo "Usage: $0 {start | stop | restart}"