aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2004-09-03 11:15:14 +0800
committerdougb <dougb@FreeBSD.org>2004-09-03 11:15:14 +0800
commit586746364e1ac71c2117e4f163bc63d44157bfa6 (patch)
tree13128bef7bd823d06f1ea536660c9503fe42505b /sysutils
parent1b360377c7344bb67e3fd83864a4f4621d411dea (diff)
downloadfreebsd-ports-gnome-586746364e1ac71c2117e4f163bc63d44157bfa6.tar.gz
freebsd-ports-gnome-586746364e1ac71c2117e4f163bc63d44157bfa6.tar.zst
freebsd-ports-gnome-586746364e1ac71c2117e4f163bc63d44157bfa6.zip
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>
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/nut/files/nut.sh.sample10
-rw-r--r--sysutils/nut22/files/nut.sh.sample10
2 files changed, 8 insertions, 12 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
diff --git a/sysutils/nut22/files/nut.sh.sample b/sysutils/nut22/files/nut.sh.sample
index 79537db58840..fb2d0cd405b2 100644
--- a/sysutils/nut22/files/nut.sh.sample
+++ b/sysutils/nut22/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