nearly complete install script

This commit is contained in:
rkaldung 2014-08-13 18:36:16 +02:00
parent 3c48ba6420
commit 4109266fa5

View file

@ -21,7 +21,8 @@ function check_os()
{ {
# Debian # Debian
if [ -f /etc/debian_version ]; then 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 if [ $MAJOR -lt 7 ]; then
echo Please check the supported operating systems echo Please check the supported operating systems
exit 1 exit 1
@ -30,7 +31,6 @@ function check_os()
} }
check_requirements check_requirements
check_os 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 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'
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