]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - dist/slc/src/main/scripts/preinstall-5
Improve logging
[gpl/argeo-slc.git] / dist / slc / src / main / scripts / preinstall-5
index c51911ab2e4af6ec2aa29bf5adaeaff91276890d..6617857344e83e24b3dd19f5bdadc9ae9808cdf6 100644 (file)
@@ -1,11 +1,21 @@
 if [ $1 = "1" ];then
        APP=%{name}
        
-       # create application user (EL5)
-       useradd -r --home-dir /var/lib/$APP --shell /sbin/nologin --create-home $APP
+       # check if user exists
+       /bin/id $APP 2>/dev/null
+       if [ $? -ne 0 ];then
+               # create application user (EL5)
+               useradd -r --home-dir /var/lib/$APP --shell /sbin/nologin --create-home $APP
+       fi
        
        # give read access to group on home
        chmod g+r /var/lib/$APP
        mkdir -p /var/lib/$APP/{conf,data}
        chown $APP.$APP /var/lib/$APP/{conf,data}
-fi
\ No newline at end of file
+fi
+
+# mkdir -p /etc/$APP
+# chown root.$APP /etc/$APP
+# chmod 640 /etc/$APP
+
+# chmod u+x /etc/init.d/$APP
\ No newline at end of file