mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-06 06:30:19 +00:00
a0156c5c5b
These changes apply to all ports, unless mentioned otherwise: - Move jakarta-tomcat55 to tomcat55 (it is no longer a Jakarta project). [6] - Improve the tomcat55 rc script. Fix PID handling. Improve the shutdown process. Use USE_RC_SUBR to its full potential. [2] - Backport tomcat55 rc script to the other tomcat ports. This allows us to pass command line arguments to the JVM. Noted in UPDATING. [1], [3], [4] - Change ownership of installed files. All files are now installed with default uid/gid (root:wheel) except for those in the conf/, logs/, temp/ and work/ directories. [5] - No longer install tomcatXXctl binary. rc scripts are more flexible and can be reconfigured without recompiling. - Remove AUTO_START and STOP_TIMEOUT (replaced with rc tomcatXX_stop_timeout). - Remove a long list of sed expressions in favour of SUB_LIST. - Move pkg_{,de}install to files/pkg_{,de}install.in. Add them to SUB_FILES. Tidy up substitutions and remove hardcoded values. - Some nonfunctional tidying and removal of Makefile cruft. PR: ports/38018 [1], ports/38020 [2], ports/74344 [3], ports/75143 [4], ports/83434 [5], ports/92692 [6] Submitted by: Ari Suutari <ari.suutari@syncrontech.com> [1] [2], SimpleRezo Team <freebsd@simplerezo.com> [3], Anton Yudin <toha@toha.org.ua> [4], Jan Grant <jan.grant@bristol.ac.uk> [5], lawrance [6] Approved by: Kang Liu <liukang@cn.freebsd.org> (maintainer) [6] Maintainer timeouts on [1], [2], [3], [4], [5] Big thanks to: hq for the initial tomcat55 script jasonb on FreeNode #tomcat for packaging advice
48 lines
1.1 KiB
Bash
48 lines
1.1 KiB
Bash
#!/bin/sh
|
|
#
|
|
# This script does the following.
|
|
#
|
|
# * Checks if the PID file exists. If it does, it kills the
|
|
# process and removes the PID file.
|
|
#
|
|
# * Checks if the '%%USER%%' user exists. If it does, then it displays
|
|
# a message.
|
|
#
|
|
# $FreeBSD: /tmp/pcvs/ports/www/jakarta-tomcat41/files/Attic/pkg-deinstall.in,v 1.1 2006-02-07 08:50:08 lawrance Exp $
|
|
#
|
|
|
|
USER=%%USER%%
|
|
PID_FILE=%%PID_FILE%%
|
|
|
|
# Make sure we're in the right stage of the process
|
|
if [ "$2" = "DEINSTALL" ]; then
|
|
|
|
# Kill the process if it is still running
|
|
if [ -s ${PID_FILE} ]; then
|
|
PID=`cat ${PID_FILE}`
|
|
echo -n ">> Killing Jakarta Tomcat process (${PID})..."
|
|
/bin/kill ${PID} > /dev/null 2> /dev/null
|
|
if [ $? -eq 0 ]; then
|
|
echo " [ DONE ]"
|
|
else
|
|
echo " [ FAILED ]"
|
|
fi
|
|
echo -n ">> Removing PID file (${PID_FILE})..."
|
|
rm ${PID_FILE} > /dev/null 2> /dev/null
|
|
if [ $? -eq 0 ]; then
|
|
echo " [ DONE ]"
|
|
else
|
|
echo " [ FAILED ]"
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
if [ "$2" = "POST-DEINSTALL" ]; then
|
|
# If the user exists, then display a message
|
|
if pw usershow "${USER}" 2>/dev/null 1>&2; then
|
|
echo "To delete the ${USER} user permanently, use 'pw userdel ${USER}'"
|
|
fi
|
|
fi
|
|
|
|
exit 0
|