diff options
author | tnut <thierryn1 at hispeed dot ch> | 2010-02-28 22:39:42 +0100 |
---|---|---|
committer | tnut <thierryn1 at hispeed dot ch> | 2010-02-28 22:39:42 +0100 |
commit | 5a0c4cbe30691eeb66b1b10e3f4ed73bda00efa8 (patch) | |
tree | 9bb9127a35b5be354a021a1cb033b4c8f3f07abb /test/tomcat/tomcat.install | |
parent | c7752ba75adfa43cc2839074566b3a2ede63432b (diff) | |
parent | e57f8d990a2d9ae2c84bbe39d2a53537a2533517 (diff) | |
download | nutyx-pakxe-5a0c4cbe30691eeb66b1b10e3f4ed73bda00efa8.tar.gz nutyx-pakxe-5a0c4cbe30691eeb66b1b10e3f4ed73bda00efa8.tar.bz2 nutyx-pakxe-5a0c4cbe30691eeb66b1b10e3f4ed73bda00efa8.tar.xz nutyx-pakxe-5a0c4cbe30691eeb66b1b10e3f4ed73bda00efa8.zip |
Merge commit 'lesibel/master'
Diffstat (limited to 'test/tomcat/tomcat.install')
-rwxr-xr-x | test/tomcat/tomcat.install | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/tomcat/tomcat.install b/test/tomcat/tomcat.install new file mode 100755 index 000000000..3ed956226 --- /dev/null +++ b/test/tomcat/tomcat.install @@ -0,0 +1,37 @@ +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 |