freebsd-ports/irc/ircproxy/files/pkg-deinstall.in
Sylvio Cesar Teixeira 66afe9bdcf - Update to 1.3.6
- Change creation of USER and GROUP to stay of accord with porters-handbook.
- Update site of vendor

Approved by:	itetcu (mentor, implicit)
2010-04-17 20:14:12 +00:00

42 lines
836 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
case $2 in
POST-DEINSTALL)
cat <<EOMSG
Note:
The ircproxy related user accounts and groups were not removed.
To remove the %%IRC_USR%% user and the %%IRC_GRP%% group which were
created by a default installation of this package, run:
# pw groupdel %%IRC_GRP%%
# pw userdel %%IRC_USR%%
EOMSG
PIDFILE="/var/run/ircproxyd.pid"
if [ -f $PIDFILE ] && [ -r $PIDFILE ] ; then
PID=`cat "$PIDFILE"`
ps -p "$PID" >/dev/null 2>&1
if [ $? -eq 0 ]; then
for count in 1 2 3 4 5 6 7 8 9 10; do
if [ $count -ge 5 ]; then
kill -KILL "$PID" || break
break
fi
kill -TERM "$PID" || break
sleep 2
ps -p "$PID" >/dev/null 2>&1
if [ ! $? -eq 0 ]; then
break;
fi
done
fi
fi
echo
;;
esac