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
/sonar
/bin
/sonar.sh
/etc
/rc.d
/sonar
13 ln -s /etc
/sonar
/ -d /opt
/sonar
/conf
14 echo ">>> Creating user and group and setting permissions..."
15 getent group sonar
> /dev
/null || usr
/sbin
/groupadd sonar
16 getent passwd sonar
> /dev
/null || usr
/sbin
/useradd
-c \
17 'Sonar Code Quality metric system' -g sonar
-d '/opt/sonar' \
18 --system -s /bin
/bash sonar
&> /dev
/null
22 chown
-R sonar
:sonar
*
23 chown
-R root
:sonar
/var
/log
/sonar
24 chmod -R 775 /var
/log
/sonar
26 chown
-R sonar
:sonar
/var
/run
/sonar
30 >>> This package is part of the ArchLinux Development Stack, vist
31 >>> http://openpario.mime.oregonstate.edu:3000/projects/archdevstack for
34 >>> Sonar can now be started via /opt/sonar/bin/sonar.sh or via
37 >>> Sonar will run by default using the Derby embedded database, to change this
38 >>> to another database (e.g. MySql), please edit the
39 >>> /opt/sonar/conf/sonar.properties accordingly.
41 >>> Sonar is running by default on port 9000 and is bound to all interfaces,
42 >>> you can change this in the file /etc/sonar/sonar.properties.
44 >>> For additional information please visit http://sonar.codehaus.org
46 >>> If you are upgrading from an earlier version, please read http://sonar.codehaus.org/
47 >>> and browse to http://localhost:9000/setup.
51 # arg 1: the new package version
52 # arg 2: the old package version
57 # arg 1: the new package version
58 # arg 2: the old package version
62 chown
-R sonar
:sonar
*
63 chown
-R root
:sonar
/var
/log
/sonar
64 chmod -R 775 /var
/log
/sonar
66 chown
-R sonar
:sonar
/var
/run
/sonar
70 # arg 1: the old package version
75 # arg 1: the old package version
77 getent passwd sonar
> /dev
/null
&& usr
/sbin
/userdel sonar
&>/dev
/null
78 getent group sonar
> /dev
/null
&& usr
/sbin
/groupdel sonar
&>/dev
/null
80 if [ -x /var
/run
/sonar
] ; then