diff options
author | demon <demon@FreeBSD.org> | 2003-12-31 00:18:46 +0800 |
---|---|---|
committer | demon <demon@FreeBSD.org> | 2003-12-31 00:18:46 +0800 |
commit | 8b143735231388d06bf78f04e77e3b2f5c41035e (patch) | |
tree | a3d40a4ccf1795a7d800b5b831b66d196c85dc19 /net/jabberd/files | |
parent | d21660280505d358581c278c4d9a604a658ea845 (diff) | |
download | freebsd-ports-gnome-8b143735231388d06bf78f04e77e3b2f5c41035e.tar.gz freebsd-ports-gnome-8b143735231388d06bf78f04e77e3b2f5c41035e.tar.zst freebsd-ports-gnome-8b143735231388d06bf78f04e77e3b2f5c41035e.zip |
Install startup script jabberd.sh.
Create user/group for jabberd on install.
Diffstat (limited to 'net/jabberd/files')
-rw-r--r-- | net/jabberd/files/jabberd.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/net/jabberd/files/jabberd.sh b/net/jabberd/files/jabberd.sh new file mode 100644 index 000000000000..26cdf2e7e5b4 --- /dev/null +++ b/net/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 |