Versionbump hudson
[archlinuxdevstack.git] / nexus / nexus.install
blob453031d42b82c149f91a08182f5dfabdb475c5c1
1 #!/bin/sh
2 # $Id$
3 # vim:set ts=2 sw=2 et:
5 # arg 1: the new package version
6 pre_install() {
7 /bin/true
10 # arg 1: the new package version
11 post_install() {
12 ln -s /opt/nexus/bin/nexus /etc/rc.d/nexus
14 echo ">>> Creating user and group and setting permissions..."
15 getent group nexus > /dev/null || usr/sbin/groupadd nexus
16 getent passwd nexus > /dev/null || usr/sbin/useradd -c \
17 'Maven Repository Manager' -g nexus -d '/opt/nexus' \
18 --system -s /bin/bash nexus &> /dev/null
20 cd opt/nexus
22 chown -R nexus:nexus *
23 chown -R nexus:nexus /var/lib/nexus
24 chown -R nexus:nexus /opt/nexus
25 chown -R nexus:nexus /var/run/nexus
27 cat << EOF
28 >>>
29 >>> This package is part of the ArchLinux Development Stack, vist
30 >>> http://openpario.mime.oregonstate.edu:3000/projects/archdevstack for
31 >>> more information.
32 >>>
33 >>> Nexus can be started via /opt/nexus/bin/nexus or via /etc/rc.d/nexus.
34 >>> If you would like to start it on system startup, please add it to the
35 >>> DAEMONS entry in your rc.conf.
36 >>>
37 >>> Nexus is running by default on port 8081 and is bound to all interfaces,
38 >>> you can change this in the nexus.properties as well.
39 >>>
40 >>> The nexus.log can be found in /var/lib/nexus/logs.
41 >>>
42 >>> For additional information please visit http://nexus.sonatype.org
43 EOF
46 # arg 1: the new package version
47 # arg 2: the old package version
48 pre_upgrade() {
49 /bin/true
52 # arg 1: the new package version
53 # arg 2: the old package version
54 post_upgrade() {
55 /bin/true
58 # arg 1: the old package version
59 pre_remove() {
60 /bin/true
63 # arg 1: the old package version
64 post_remove() {
65 getent passwd nexus > /dev/null && usr/sbin/userdel nexus &>/dev/null
66 getent group nexus > /dev/null && usr/sbin/groupdel nexus &>/dev/null
68 if [ -d /var/run/nexus ] ; then
69 rm -r /var/run/nexus
70 fi
72 if [ -d /var/lib/nexus ] ; then
73 rm -r /var/lib/nexus
74 fi
76 if [ -f /etc/rc.d/nexus ] ; then
77 rm /etc/rc.d/nexus
78 fi