diff options
Diffstat (limited to 'net-im/jabberd/files/jabberd.sh')
-rw-r--r-- | net-im/jabberd/files/jabberd.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/net-im/jabberd/files/jabberd.sh b/net-im/jabberd/files/jabberd.sh new file mode 100644 index 000000000000..26cdf2e7e5b4 --- /dev/null +++ b/net-im/jabberd/files/jabberd.sh @@ -0,0 +1,27 @@ +#! /bin/sh + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/jabberd\.sh\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi + +USER="jabber" +RUNDIR="/var/tmp" +HOSTNAME=`/bin/hostname` + +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 +start) + su -f -m ${USER} -c "jabberd" ;; + +stop) + killall -SIGKILL -u ${USER} jabberd; + rm -f ${RUNDIR}/jabber.pid; +esac |