diff options
author | Edwin Groothuis <edwin@FreeBSD.org> | 2003-12-29 06:21:20 +0000 |
---|---|---|
committer | Edwin Groothuis <edwin@FreeBSD.org> | 2003-12-29 06:21:20 +0000 |
commit | 12f56a38a7178dc6335f27c4ce0a2d6336762ba2 (patch) | |
tree | 88dd7135fa5b41bfb4f596c8373ecc6a242577ab /net/spread/files/spread.sh | |
parent | [New Port]:: www/drupal 4.3.1 Update & Fix plist (diff) |
[MAINTAINER UPDATE] New versions of spread, spread-j and py-spreadmodule
* Use more bsd.port.mk convenience switches.
* Use rc.subr properly for spread daemon.
* Write a logfile rather than spewing to stdio.
* Move rendezvous socket to /var/run.
* Make Makefile.PL behave properly with PREFIX.
PR: ports/60053
Submitted by: Joshua Goodall <joshua@roughtrade.net>
Notes
Notes:
svn path=/head/; revision=96846
Diffstat (limited to 'net/spread/files/spread.sh')
-rw-r--r-- | net/spread/files/spread.sh | 62 |
1 files changed, 30 insertions, 32 deletions
diff --git a/net/spread/files/spread.sh b/net/spread/files/spread.sh index ebeb5adf697f..adc11250484f 100644 --- a/net/spread/files/spread.sh +++ b/net/spread/files/spread.sh @@ -1,36 +1,34 @@ #!/bin/sh # # $FreeBSD$ +# + +# PROVIDE: spread +# REQUIRE: LOGIN +# KEYWORD: FreeBSD shutdown + +# +# Add the following lines to /etc/rc.conf to enable spread: +# +#spread_enable="YES" +# +# See spread(1) for flags +# + +. %%RC_SUBR%% + +name=spread +rcvar=`set_rcvar` + +command="%%PREFIX%%/sbin/spread" +command_args="" +pidfile=/var/run/${name}.pid +required_files=%%PREFIX%%/etc/${name}.conf + +# set defaults + +spread_enable=${spread_enable:-"NO"} +spread_flags=${spread_flags:-""} -if ! prefix=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then - echo "$0: Cannot determine the prefix" >&2 - exit 1 -fi -spread=${prefix}/sbin/spread -pidfile=/var/run/spread.pid -out=/var/log/spread.out -daemon=/usr/sbin/daemon - -case "$1" in -start) - if [ -x ${spread} ]; then - echo -n ' spread' - ${daemon} -c ${spread} >${out} 2>&1 <&- - fi - ;; -stop) - if [ -f ${pidfile} ]; then - kill `cat ${pidfile}` - echo -n ' spread' - rm ${pidfile} - else - echo ' spread: not running' - fi - ;; -*) - echo "Usage: `basename $0` {start|stop}" >&2 - exit 64 - ;; -esac - -exit 0 +load_rc_config ${name} +run_rc_command "$1" |