diff options
author | Doug Barton <dougb@FreeBSD.org> | 2004-09-03 03:15:14 +0000 |
---|---|---|
committer | Doug Barton <dougb@FreeBSD.org> | 2004-09-03 03:15:14 +0000 |
commit | 7d167c85f3ba6c51f6609169b5c3ee91c648b137 (patch) | |
tree | 4d5c93fdcc0b43aa69a302023234ac1b1ac9f94d /sysutils/nut | |
parent | o Update to 2.2.2 to unbreak for 5-STABLE (diff) |
Update to use the upsdrvctl program to start and stop. This should
remove the need to edit this file for 99% of users. Editing the config
files will still be necessary however.
Submitted by: Rob MacGregor <rob.macgregor@gmail.com>
Notes
Notes:
svn path=/head/; revision=117992
Diffstat (limited to 'sysutils/nut')
-rw-r--r-- | sysutils/nut/files/nut.sh.sample | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sysutils/nut/files/nut.sh.sample b/sysutils/nut/files/nut.sh.sample index 79537db58840..fb2d0cd405b2 100644 --- a/sysutils/nut/files/nut.sh.sample +++ b/sysutils/nut/files/nut.sh.sample @@ -19,21 +19,19 @@ BIN=${PREFIX}/bin SBIN=${PREFIX}/sbin MODELS=${PREFIX}/libexec/nut -UPSTYPE='genericups' -UPSFLAGS='-a backups' - UPSLOG='/var/log/ups.log' UPSLOGINTERVAL='300' case "${1}" in start) - ${MODELS}/${UPSTYPE} ${UPSFLAGS} + ${MODELS}/upsdrvctl start ${SBIN}/upsd ${SBIN}/upsmon localhost ${BIN}/upslog -s backups@localhost -l ${UPSLOG} -i ${UPSLOGINTERVAL} ;; stop) - /usr/bin/killall upslog upsmon upsd ${UPSTYPE} + /usr/bin/killall upslog upsmon upsd + ${MODELS}/upsdrvctl stop ;; restart) $0 stop @@ -46,7 +44,7 @@ esac exit 0 -# Copyright (c) 2003 The FreeBSD Project +# Copyright (c) 2003-2004 The FreeBSD Project # All rights reserved. # # Redistribution and use in source and binary forms, with or without |