commit
178d32754c
1 changed files with 6 additions and 7 deletions
|
@ -10,15 +10,14 @@ DB="zammad_production"
|
||||||
DB_USER="zammad"
|
DB_USER="zammad"
|
||||||
|
|
||||||
# check which init system is used
|
# check which init system is used
|
||||||
if [ -n "$(which initctl)" ]; then
|
if [ -n $(which initctl) ]; then
|
||||||
INIT_CMD="initctl"
|
INIT_CMD="initctl"
|
||||||
elif [ -n "$(which systemctl)" ]; then
|
elif [ -n $(which systemctl) ]; then
|
||||||
INIT_CMD="systemctl"
|
INIT_CMD="systemctl"
|
||||||
else
|
else
|
||||||
function sysvinit () {
|
function sysvinit () {
|
||||||
service $2 $1
|
service $2 $1
|
||||||
}
|
}
|
||||||
|
|
||||||
INIT_CMD="sysvinit"
|
INIT_CMD="sysvinit"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -59,17 +58,17 @@ echo "# Starting Zammad"
|
||||||
${INIT_CMD} start zammad
|
${INIT_CMD} start zammad
|
||||||
|
|
||||||
# nginx config
|
# nginx config
|
||||||
if [ -n "$(which nginx)" ];then
|
if [ -n $(which nginx) ]; then
|
||||||
# copy nginx config
|
# copy nginx config
|
||||||
# debian / ubuntu
|
# debian / ubuntu
|
||||||
if [ -d /etc/nginx/sites-enabled ]; then
|
if [ -d /etc/nginx/sites-enabled ]; then
|
||||||
NGINX_CONF="/etc/nginx/sites-enabled/zammad.conf"
|
NGINX_CONF="/etc/nginx/sites-enabled/zammad.conf"
|
||||||
test -f /etc/nginx/sites-available/zammad.conf || cp ${ZAMMAD_DIR}/contrib/nginx/zammad.conf /etc/nginx/sites-available/zammad.conf
|
test -f /etc/nginx/sites-available/zammad.conf || cp ${ZAMMAD_DIR}/contrib/nginx/zammad.conf /etc/nginx/sites-available/zammad.conf
|
||||||
test -f /etc/nginx/sites-available/zammad.conf || ln -s /etc/nginx/sites-available/zammad.conf /etc/nginx/sites-enabled/zammad.conf
|
test -h ${NGINX_CONF} || ln -s /etc/nginx/sites-available/zammad.conf ${NGINX_CONF}
|
||||||
# centos / sles
|
# centos / sles
|
||||||
elif [ -d /etc/nginx/conf.d ]; then
|
elif [ -d /etc/nginx/conf.d ]; then
|
||||||
NGINX_CONF="/etc/nginx/conf.d/zammad.conf"
|
NGINX_CONF="/etc/nginx/conf.d/zammad.conf"
|
||||||
test -f /etc/nginx/conf.d/zammad.conf || cp ${ZAMMAD_DIR}/contrib/nginx/zammad.conf /etc/nginx/conf.d/zammad.conf
|
test -f ${NGINX_CONF} || cp ${ZAMMAD_DIR}/contrib/nginx/zammad.conf ${NGINX_CONF}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "# Restarting Nginx"
|
echo "# Restarting Nginx"
|
||||||
|
|
Loading…
Reference in a new issue