From 4109266fa5a108e14aa94452d5611e1930c57208 Mon Sep 17 00:00:00 2001 From: rkaldung Date: Wed, 13 Aug 2014 18:36:16 +0200 Subject: [PATCH] nearly complete install script --- script/install.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/script/install.sh b/script/install.sh index 5c658e92b..67da70b27 100644 --- a/script/install.sh +++ b/script/install.sh @@ -21,7 +21,8 @@ function check_os() { # Debian if [ -f /etc/debian_version ]; then - MAJOR=$(cut -d. /etc/debian_version -f1) + OS=Debian + local MAJOR=$(cut -d. /etc/debian_version -f1) if [ $MAJOR -lt 7 ]; then echo Please check the supported operating systems exit 1 @@ -30,7 +31,6 @@ function check_os() } check_requirements - check_os @@ -97,3 +97,10 @@ sudo -u "${USER}" -H bash -l -c 'cd ~/zammad && RAILS_ENV=production rake db:mig sudo -u "${USER}" -H bash -l -c 'cd ~/zammad && RAILS_ENV=production rake db:seed' sudo -u "${USER}" -H bash -l -c 'cd ~/zammad && RAILS_ENV=production rake assets:precompile' +cp "${HOMEDIR}/zammad/script/init.d/zammad /etc/init.d/zammad" +chmod +x /etc/init.d/zammad + +if [ "$OS" = "Debian" ]; then + update-rc.d zammad defaults +fi +