Просмотр исходного кода

add sles 12 to pkgr.yml and check for used initservioce in pkgr-postinstall.sh fixes

André Bauer 8 лет назад
Родитель
Сommit
159d1fc8ed

+ 1 - 1
.pkgr.yml

@@ -18,7 +18,7 @@ targets:
   ubuntu-16.04:
     dependencies:
       - postgresql
-  sles-12
+  sles-12:
     dependencies:
       - postgresql
 before:

+ 0 - 0
Gemfile.local from .pkgr.yml - packager.io complains about double use


+ 4 - 7
contrib/pkgr-postinstall.sh

@@ -10,13 +10,10 @@ DB="zammad_production"
 DB_USER="zammad"
 
 # check which init system is used
-SYSTEMD="$(which systemd)"
-UPSTART="$(which initctl)"
-
-if [ -n ${UPSTART} ]; then
-    INIT_COMMAND="initctl"
-elif [ -n ${SYSTEMD} ]; then
-    INIT_CMD="systemd"
+if [ -n "$(which initctl)" ]; then
+    INIT_CMD="initctl"
+elif [ -n "$(which systemctl)" ]; then
+    INIT_CMD="systemctl"
 else
     function sysvinit () {
 	service $2 $1