]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - dist/slc/src/main/scripts/preinstall-5
Update headers
[gpl/argeo-slc.git] / dist / slc / src / main / scripts / preinstall-5
index c51911ab2e4af6ec2aa29bf5adaeaff91276890d..b599581bb491939f7f92c3c7a15302a2a96297eb 100644 (file)
@@ -1,8 +1,12 @@
 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