diff options
author | Dmitry Sivachenko <demon@FreeBSD.org> | 2004-01-01 13:19:25 +0000 |
---|---|---|
committer | Dmitry Sivachenko <demon@FreeBSD.org> | 2004-01-01 13:19:25 +0000 |
commit | b635444c7d523057d52c66a211e51c6494bb1ef8 (patch) | |
tree | 56ca528af60aeb7362067630d7f2c90fe375a0ca /net/jabberd | |
parent | 81e556ca75c4d7d4f57bae9ccf85d5e564771dc8 (diff) | |
download | ports-b635444c7d523057d52c66a211e51c6494bb1ef8.tar.gz ports-b635444c7d523057d52c66a211e51c6494bb1ef8.zip |
Notes
Diffstat (limited to 'net/jabberd')
-rw-r--r-- | net/jabberd/files/jabberd.sh | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/net/jabberd/files/jabberd.sh b/net/jabberd/files/jabberd.sh index 26cdf2e7e5b4..c7dee3844214 100644 --- a/net/jabberd/files/jabberd.sh +++ b/net/jabberd/files/jabberd.sh @@ -6,7 +6,7 @@ if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/jabberd\.sh\$"); then fi USER="jabber" -RUNDIR="/var/tmp" +RUNDIR="/var/jabberd/pid" HOSTNAME=`/bin/hostname` test -x ${PREFIX}/bin/jabberd || exit 1 @@ -14,14 +14,24 @@ test -x ${PREFIX}/bin/jabberd || exit 1 export PATH=/sbin:/bin:/usr/bin:${PREFIX}/bin:${PREFIX}/sbin umask 077 -echo -n " jabberd" cd ${RUNDIR} || exit -case ${1:-start} in +case "$1" in start) - su -f -m ${USER} -c "jabberd" ;; - + su -f -m ${USER} -c ${PREFIX}/bin/jabberd & + echo -n ' jabberd' + ;; stop) - killall -SIGKILL -u ${USER} jabberd; - rm -f ${RUNDIR}/jabber.pid; + killall -u ${USER} jabberd c2s resolver router s2s sm + for file in c2s resolver router s2s sm + do + rm -f ${RUNDIR}/$file.pid + done + echo -n ' jabberd' + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + ;; esac + +exit 0 |