PREIN
/bin/sh
# Add the "jetty5" user and group
# we need a shell to be able to use su - later
/usr/sbin/groupadd -r jetty5 2> /dev/null || :
/usr/sbin/useradd -c "Jetty5" -r -g jetty5 \
-s /bin/sh -d /usr/share/jetty5 jetty5 2> /dev/null || :
PREUN
/bin/sh
if [ $1 = 0 ]; then
[ -f /var/lock/subsys/jetty5 ] && /etc/rc.d/init.d/jetty5 stop
[ -f /etc/rc.d/init.d/jetty5 -a -x /sbin/chkconfig ] && /sbin/chkconfig --del jetty5
# Don't
# /usr/sbin/userdel jetty5 >> /dev/null 2>&1 || :
# /usr/sbin/groupdel jetty5 >> /dev/null 2>&1 || :
# Remove automated symlinks
for repository in /usr/share/jetty5/ext ; do
find $repository -name '\[*\]*.jar' ! -type d -exec rm -f {} \;
done
fi
POSTIN
/bin/sh
[ -x /sbin/chkconfig ] && /sbin/chkconfig --add jetty5