Initial support for CentOS 7
This commit is contained in:
@@ -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"
|
||||
;;
|
||||
*)
|
||||
|
||||
@@ -39,9 +39,9 @@ restart_nginx() {
|
||||
sudo /sbin/service nginx reload > /dev/null
|
||||
;;
|
||||
|
||||
arch)
|
||||
arch|centos)
|
||||
sudo /usr/bin/systemctl reload nginx
|
||||
;;
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user