summaryrefslogtreecommitdiff
path: root/net-im/jabber
diff options
context:
space:
mode:
Diffstat (limited to 'net-im/jabber')
-rw-r--r--net-im/jabber/Makefile1
-rw-r--r--net-im/jabber/files/jabberd.sh13
2 files changed, 13 insertions, 1 deletions
diff --git a/net-im/jabber/Makefile b/net-im/jabber/Makefile
index af131afe9f1b..a3431e6adfa7 100644
--- a/net-im/jabber/Makefile
+++ b/net-im/jabber/Makefile
@@ -7,6 +7,7 @@
PORTNAME= jabber
PORTVERSION= 1.4.3.1
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://devel.amessage.info/jabberd14/
DISTNAME= ${PORTNAME}d-${PORTVERSION}
diff --git a/net-im/jabber/files/jabberd.sh b/net-im/jabber/files/jabberd.sh
index 2ad8b7ea99c7..109855681eff 100644
--- a/net-im/jabber/files/jabberd.sh
+++ b/net-im/jabber/files/jabberd.sh
@@ -19,8 +19,19 @@ cd ${RUNDIR} || exit
case ${1:-start} in
start)
- su -f -m ${USER} -c "jabberd -B -h ${HOSTNAME} -c ${PREFIX}/etc/jabber.xml" ;;
+ if [ -f jabber.pid ]; then
+ pid=`cat jabber.pid`
+ if [ ! -z "$pid" ] && kill -0 -- "$pid"; then
+ echo "A pidfile already exists at the specified location."
+ echo "Check to ensure another copy of the server is not running, or remove the existing file."
+ exit 1
+ fi
+ rm -f ${RUNDIR}/jabber.pid;
+ fi
+
+ su -f -m ${USER} -c "jabberd -B -h ${HOSTNAME} -c ${PREFIX}/etc/jabber.xml"
+ ;;
stop)
killall -SIGKILL -u ${USER} jabberd;
rm -f ${RUNDIR}/jabber.pid;