mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
38 lines
887 B
Text
38 lines
887 B
Text
|
post_install() {
|
||
|
if [ ! `grep tomcat /etc/group` ]; then
|
||
|
groupadd -g 66 tomcat &>/dev/null;
|
||
|
fi
|
||
|
|
||
|
id tomcat &>/dev/null || \
|
||
|
useradd -u 66 -g tomcat -d /opt/tomcat -s /bin/false tomcat
|
||
|
|
||
|
if [ -f lib/modules/`uname -r`/kernel/security/capability.ko ]; then
|
||
|
echo ">>> It appears that your current kernel has linux security"
|
||
|
echo ">>> capabilities built as a module. tomcat requires this"
|
||
|
echo ">>> functionality to operate."
|
||
|
echo ">>>"
|
||
|
echo ">>> To activate the module, please load it now (modprobe capability)."
|
||
|
echo ">>> Also, you should add it to your MODULES array in rc.conf, so"
|
||
|
echo ">>> it will be activated automatically at boot-up."
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
post_upgrade() {
|
||
|
post_install $1
|
||
|
}
|
||
|
|
||
|
pre_remove() {
|
||
|
userdel tomcat &> /dev/null
|
||
|
groupdel tomcat &> /dev/null
|
||
|
}
|
||
|
|
||
|
post_remove() {
|
||
|
/bin/true
|
||
|
}
|
||
|
|
||
|
op=$1
|
||
|
shift
|
||
|
|
||
|
$op $*
|
||
|
# vim: ts=2 sw=2 et ft=sh
|