3 # vim:set ts=2 sw=2 et:
5 # arg 1: the new package version
10 # arg 1: the new package version
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
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
29 >>> Nexus can be started via /opt/nexus/bin/nexus or via /etc/rc.d/nexus.
30 >>> If you would like to start it on system startup, please add it to the
31 >>> DAEMONS entry in your rc.conf.
33 >>> Nexus is running by default on port 8081 and is bound to all interfaces,
34 >>> you can change this in the nexus.properties as well.
36 >>> The nexus.log can be found in /var/lib/nexus/logs.
38 >>> For additional information please visit http://nexus.sonatype.org
42 # arg 1: the new package version
43 # arg 2: the old package version
48 # arg 1: the new package version
49 # arg 2: the old package version
53 chown
-R nexus
:nexus
*
54 chown
-R nexus
:nexus
/var
/lib
/nexus
55 chown
-R nexus
:nexus
/opt
/nexus
56 chown
-R nexus
:nexus
/var
/run
/nexus
60 # arg 1: the old package version
65 # arg 1: the old package version
67 getent passwd nexus
> /dev
/null
&& usr
/sbin
/userdel nexus
&>/dev
/null
68 getent group nexus
> /dev
/null
&& usr
/sbin
/groupdel nexus
&>/dev
/null
70 if [ -d /var
/run
/nexus
] ; then
74 if [ -d /var
/lib
/nexus
] ; then
78 if [ -h /etc
/rc.d
/nexus
] ; then