File: upsd.sh.sample

package info (click to toggle)
nut 0.45.5-rel-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,984 kB
  • ctags: 2,146
  • sloc: ansic: 22,216; sh: 1,138; makefile: 405
file content (19 lines) | stat: -rw-r--r-- 381 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

PREFIX=%%PREFIX%%

SBIN=${PREFIX}/sbin
UPSTYPE="apcsmart"
UPSFLAGS=""
UPSDEV="/dev/cuaa3"
UPSLOG="/var/log/ups.log"
UPSLOGINTERVAL="300"

if [ x$1 = xstart ]; then
	${SBIN}/$UPSTYPE $UPSFLAGS $UPSDEV
	${SBIN}/upsd
	${SBIN}/upsmon localhost
	${SBIN}/upslog localhost $UPSLOG $UPSLOGINTERVAL
elif [ "x$1" = "xstop" ]; then
	/usr/bin/killall upslog upsmon upsd $UPSTYPE
fi