From b3ef1b53ac4aab3836812fbf2687560037f4e5e0 Mon Sep 17 00:00:00 2001 From: rkaldung Date: Wed, 13 Aug 2014 16:25:24 +0200 Subject: [PATCH] added 1st os detection --- script/install.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/script/install.sh b/script/install.sh index 0db349dcb..5c658e92b 100644 --- a/script/install.sh +++ b/script/install.sh @@ -17,8 +17,23 @@ function check_requirements() { done } +function check_os() +{ + # Debian + if [ -f /etc/debian_version ]; then + MAJOR=$(cut -d. /etc/debian_version -f1) + if [ $MAJOR -lt 7 ]; then + echo Please check the supported operating systems + exit 1 + fi + fi +} + check_requirements +check_os + + # # @TODO Should the mysql user be created? # @TODO Install Elasticsearch? @@ -81,3 +96,4 @@ sudo -u "${USER}" -H bash -l -c 'cd ~/zammad && RAILS_ENV=production rake db:cre sudo -u "${USER}" -H bash -l -c 'cd ~/zammad && RAILS_ENV=production rake db:migrate' 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' +