Initial support for CentOS 7

This commit is contained in:
Edgars Beigarts
2016-09-19 06:42:24 +03:00
parent cf901c9bcc
commit 0004dd53e1
11 changed files with 281 additions and 11 deletions

View File

@@ -12,7 +12,7 @@ flag_rsyslog_needs_restart=n
# exits gracefully if the path already exists
mkdir -m 775 -p "$DOKKU_LOGS_DIR"
case "$DOKKU_DISTRO" in
arch|debian)
arch|debian|centos)
chgrp dokku "$DOKKU_LOGS_DIR"
;;
*)
@@ -23,7 +23,7 @@ esac
if [[ ! -f "$DOKKU_EVENTS_LOGFILE" ]]; then
touch "$DOKKU_EVENTS_LOGFILE"
case "$DOKKU_DISTRO" in
arch|debian)
arch|debian|centos)
chgrp dokku "$DOKKU_EVENTS_LOGFILE"
;;
*)

View File

@@ -39,9 +39,9 @@ restart_nginx() {
sudo /sbin/service nginx reload > /dev/null
;;
arch)
arch|centos)
sudo /usr/bin/systemctl reload nginx
;;
;;
esac
}

View File

@@ -17,6 +17,11 @@ case "$DOKKU_DISTRO" in
arch)
echo "%dokku ALL=(ALL) NOPASSWD:/usr/bin/systemctl reload nginx, /usr/sbin/nginx -t" > /etc/sudoers.d/dokku-nginx
;;
centos)
echo "%dokku ALL=(ALL) NOPASSWD:/usr/bin/systemctl reload nginx, /usr/sbin/nginx -t" > /etc/sudoers.d/dokku-nginx
echo "Defaults:dokku !requiretty" >> /etc/sudoers.d/dokku-nginx
;;
esac
chmod 0440 /etc/sudoers.d/dokku-nginx
@@ -66,10 +71,8 @@ case "$DOKKU_DISTRO" in
"$NGINX_INIT" nginx start || "$NGINX_INIT" nginx reload
;;
arch)
arch|centos)
NGINX_INIT="/usr/bin/systemctl"
"$NGINX_INIT" start nginx || "$NGINX_INIT" reload nginx
;;
esac