aboutsummaryrefslogtreecommitdiff
path: root/comms/conserver
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2008-06-10 19:28:06 +0000
committerCy Schubert <cy@FreeBSD.org>2008-06-10 19:28:06 +0000
commit5101049296d63e06579e8cbd172ab47cd9df09c9 (patch)
tree7c1720523942558c4ac8b59fdc93b37dbe395a95 /comms/conserver
parenta1487835689dc861006d8e78534d728e07536163 (diff)
downloadports-5101049296d63e06579e8cbd172ab47cd9df09c9.tar.gz
ports-5101049296d63e06579e8cbd172ab47cd9df09c9.zip
Notes
Diffstat (limited to 'comms/conserver')
-rw-r--r--comms/conserver/Makefile2
-rw-r--r--comms/conserver/files/conserver.sh43
-rw-r--r--comms/conserver/files/conserver.sh.in43
3 files changed, 55 insertions, 33 deletions
diff --git a/comms/conserver/Makefile b/comms/conserver/Makefile
index 0a2e495d8086..94d01f8fe727 100644
--- a/comms/conserver/Makefile
+++ b/comms/conserver/Makefile
@@ -8,7 +8,7 @@
PORTNAME= conserver
PORTVERSION= 8.5
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= comms
MASTER_SITES= ftp://ftp.physics.purdue.edu/pub/pundits/ \
http://www.komquats.com/distfiles/ \
diff --git a/comms/conserver/files/conserver.sh b/comms/conserver/files/conserver.sh
index 0c40f10b61ef..3c4cc86c37ee 100644
--- a/comms/conserver/files/conserver.sh
+++ b/comms/conserver/files/conserver.sh
@@ -2,29 +2,40 @@
# $FreeBSD$
+# PROVIDE: conserver
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: shutdown
+
+# To enable conserver, add lines like below to /etc/rc.conf.
+#
+# conserver_enable="YES"
+
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
- echo "$0: Cannot determine the PREFIX" >&2
- exit 1
+ # echo "$0: Cannot determine the PREFIX" >&2
+ # exit 1
fi
+conserver_enable=${conserver_enable:-"no"}
+conserver_configfile=${conserver_configfile:-"${PREFIX}/etc/conserver.cf"}
+
+. /etc/rc.subr
+
+name=conserver
+rcvar=`set_rcvar`
+
+command=${PREFIX}/sbin/conserver
+command_args="-d -n -C ${conserver_configfile}"
+
+load_rc_config $name
+
case "$1" in
-start)
- if [ -x ${PREFIX}/sbin/conserver -a -f ${PREFIX}/etc/conserver.cf ]; then
- ${PREFIX}/sbin/conserver -d -n ; echo -n ' conserver'
+start) if [ -x ${command} -a -f ${configfile} ]; then
+ run_rc_command "$1"
fi
;;
-stop)
- killall -TERM conserver && echo -n ' conserver'
- ;;
-restart)
- $0 stop
- $0 start
- ;;
-status|stat)
- ps -auxww | egrep '(conserver|console)' | egrep -v "($0|egrep)"
- ;;
*)
- echo "Usage: `basename $0` {start|stop|restart|status}" >&2
+ run_rc_command "$1"
;;
esac
diff --git a/comms/conserver/files/conserver.sh.in b/comms/conserver/files/conserver.sh.in
index 0c40f10b61ef..3c4cc86c37ee 100644
--- a/comms/conserver/files/conserver.sh.in
+++ b/comms/conserver/files/conserver.sh.in
@@ -2,29 +2,40 @@
# $FreeBSD$
+# PROVIDE: conserver
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: shutdown
+
+# To enable conserver, add lines like below to /etc/rc.conf.
+#
+# conserver_enable="YES"
+
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
- echo "$0: Cannot determine the PREFIX" >&2
- exit 1
+ # echo "$0: Cannot determine the PREFIX" >&2
+ # exit 1
fi
+conserver_enable=${conserver_enable:-"no"}
+conserver_configfile=${conserver_configfile:-"${PREFIX}/etc/conserver.cf"}
+
+. /etc/rc.subr
+
+name=conserver
+rcvar=`set_rcvar`
+
+command=${PREFIX}/sbin/conserver
+command_args="-d -n -C ${conserver_configfile}"
+
+load_rc_config $name
+
case "$1" in
-start)
- if [ -x ${PREFIX}/sbin/conserver -a -f ${PREFIX}/etc/conserver.cf ]; then
- ${PREFIX}/sbin/conserver -d -n ; echo -n ' conserver'
+start) if [ -x ${command} -a -f ${configfile} ]; then
+ run_rc_command "$1"
fi
;;
-stop)
- killall -TERM conserver && echo -n ' conserver'
- ;;
-restart)
- $0 stop
- $0 start
- ;;
-status|stat)
- ps -auxww | egrep '(conserver|console)' | egrep -v "($0|egrep)"
- ;;
*)
- echo "Usage: `basename $0` {start|stop|restart|status}" >&2
+ run_rc_command "$1"
;;
esac