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
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
48 # arg 1: the new package version
49 # arg 2: the old package version
54 # arg 1: the new package version
55 # arg 2: the old package version
60 # arg 1: the old package version
65 # arg 1: the old package version
67 getent passwd sonar
> /dev
/null
&& usr
/sbin
/userdel sonar
&>/dev
/null
68 getent group sonar
> /dev
/null
&& usr
/sbin
/groupdel sonar
&>/dev
/null
70 if [ -x /var
/run
/sonar
] ; then