Browse Source

add user w/ rpm installation

Roy Kaldung 9 years ago
parent
commit
12164f4a68
2 changed files with 13 additions and 8 deletions
  1. 5 0
      INSTALL.md
  2. 8 8
      extras/zammad.spec

+ 5 - 0
INSTALL.md

@@ -0,0 +1,5 @@
+Installation
+============
+
+* Prepare yum repository for Elasticsearch. Use then manual described [https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html#_yum](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html#_yum)
+* 

+ 8 - 8
extras/zammad.spec

@@ -70,15 +70,15 @@ export OTRSUSER=otrs
 #    cat /opt/otrs/RELEASE|grep VERSION|sed 's/VERSION = //'|sed 's/ /-/g' > /tmp/otrs-old.tmp
 #fi
 # useradd
-export OTRSUSER=zammad
+export ZUSER=zammad
 echo -n "Check OTRS user ... "
-#if id $OTRSUSER >/dev/null 2>&1; then
-#    echo "$OTRSUSER exists."
-#    # update home dir
-#    usermod -d /opt/otrs $OTRSUSER
-#else
-#    useradd $OTRSUSER -d /opt/otrs/ -s /bin/bash -g zammad -c 'Zammad user' && echo "$OTRSUSER added."
-#fi
+if id $ZUSER >/dev/null 2>&1; then
+    echo "$ZUSER exists."
+    # update home dir
+    usermod -d /opt/zammads $ZUSER
+else
+    useradd $ZUSER -d /opt/zammad -s /bin/bash -g zammad -c 'Zammad user' && echo "$ZUSER added."
+fi
 
 
 %post