From 159d1fc8ed29df72396d362dcbe3672c0546208e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Thu, 27 Oct 2016 13:50:18 +0200 Subject: [PATCH] add sles 12 to pkgr.yml and check for used initservioce in pkgr-postinstall.sh fixes --- .pkgr.yml | 2 +- ....pkgr.yml - packager.io complains about double use | 0 contrib/pkgr-postinstall.sh | 11 ++++------- 3 files changed, 5 insertions(+), 8 deletions(-) delete mode 100644 Gemfile.local from .pkgr.yml - packager.io complains about double use diff --git a/.pkgr.yml b/.pkgr.yml index b01e6fe15..1a1429b9e 100644 --- a/.pkgr.yml +++ b/.pkgr.yml @@ -18,7 +18,7 @@ targets: ubuntu-16.04: dependencies: - postgresql - sles-12 + sles-12: dependencies: - postgresql before: diff --git a/Gemfile.local from .pkgr.yml - packager.io complains about double use b/Gemfile.local from .pkgr.yml - packager.io complains about double use deleted file mode 100644 index e69de29bb..000000000 diff --git a/contrib/pkgr-postinstall.sh b/contrib/pkgr-postinstall.sh index 7469a5a48..b5f9e005e 100755 --- a/contrib/pkgr-postinstall.sh +++ b/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