added 1st os detection

This commit is contained in:
rkaldung 2014-08-13 16:25:24 +02:00
parent 592e961e70
commit b3ef1b53ac

View file

@ -17,8 +17,23 @@ function check_requirements() {
done 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_requirements
check_os
# #
# @TODO Should the mysql user be created? # @TODO Should the mysql user be created?
# @TODO Install Elasticsearch? # @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: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 db:seed'
sudo -u "${USER}" -H bash -l -c 'cd ~/zammad && RAILS_ENV=production rake assets:precompile' sudo -u "${USER}" -H bash -l -c 'cd ~/zammad && RAILS_ENV=production rake assets:precompile'