diff options
author | Neil Blakey-Milner <nbm@FreeBSD.org> | 2000-05-16 14:18:46 +0000 |
---|---|---|
committer | Neil Blakey-Milner <nbm@FreeBSD.org> | 2000-05-16 14:18:46 +0000 |
commit | 8b5c744c322219702bd1497e2d99e8c62cee5e98 (patch) | |
tree | 25c21531505447af24b2a347d0fcfd1fa24b4fcc /net-im/jabber/files/jserver.sh | |
parent | 2c6dcd605b27d9d78aa4cdcf25303baad2cd9cd7 (diff) | |
download | ports-8b5c744c322219702bd1497e2d99e8c62cee5e98.tar.gz ports-8b5c744c322219702bd1497e2d99e8c62cee5e98.zip |
Notes
Diffstat (limited to 'net-im/jabber/files/jserver.sh')
-rw-r--r-- | net-im/jabber/files/jserver.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/net-im/jabber/files/jserver.sh b/net-im/jabber/files/jserver.sh new file mode 100644 index 000000000000..c550ee513139 --- /dev/null +++ b/net-im/jabber/files/jserver.sh @@ -0,0 +1,27 @@ +#! /bin/sh + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/jserver\.sh\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi +user=jserver +rundir=/tmp +out=${rundir}/jserver.out + +export PATH=/bin:/usr/bin:${PREFIX}/bin +umask 077 + +test -x ${PREFIX}/bin/jserver || exit 1 +echo -n " jserver" +cd ${rundir} || exit + +arg=${1:-start} +case $arg in +start) + su -f -m ${user} -c \ + "jserver" \ + >>${out} 2>&1 &;; + +stop) + killall jserver;; +esac |