Add special case commands for instances where we are running dokku in debian
Refs #976
This commit is contained in:
@@ -62,9 +62,10 @@ fi
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
case "$DOKKU_DISTRO" in
|
||||
ubuntu)
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
debian|ubuntu)
|
||||
apt-get install --force-yes -qq -y nginx
|
||||
;;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ end script
|
||||
EOF
|
||||
;;
|
||||
|
||||
opensuse)
|
||||
debian|opensuse)
|
||||
cat<<EOF > /etc/systemd/system/dokku-redeploy.service
|
||||
[Unit]
|
||||
Description=Dokku app redeploy service
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian)
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes -qq -y nginx dnsutils
|
||||
;;
|
||||
|
||||
ubuntu)
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
[[ -z "$CIRCLECI" ]] && apt-get install -qq -y software-properties-common python-software-properties
|
||||
|
||||
@@ -114,6 +114,10 @@ validate_nginx() {
|
||||
|
||||
restart_nginx() {
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian)
|
||||
/usr/sbin/invoke-rc.d nginx reload > /dev/null
|
||||
;;
|
||||
|
||||
ubuntu)
|
||||
sudo /etc/init.d/nginx reload > /dev/null
|
||||
;;
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian)
|
||||
echo "%dokku ALL=(ALL) NOPASSWD:/usr/sbin/invoke-rc.d nginx reload, /usr/sbin/nginx -t" > /etc/sudoers.d/dokku-nginx
|
||||
;;
|
||||
|
||||
ubuntu)
|
||||
echo "%dokku ALL=(ALL) NOPASSWD:/etc/init.d/nginx reload, /usr/sbin/nginx -t" > /etc/sudoers.d/dokku-nginx
|
||||
;;
|
||||
@@ -41,6 +45,10 @@ chmod g+r /var/log/nginx
|
||||
[[ -f /etc/logrotate.d/nginx ]] && sed -i -e 's/invoke-rc.d/service/g' /etc/logrotate.d/nginx
|
||||
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian)
|
||||
/usr/sbin/invoke-rc.d nginx start
|
||||
;;
|
||||
|
||||
ubuntu)
|
||||
/etc/init.d/nginx start
|
||||
;;
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian)
|
||||
sudo /usr/sbin/invoke-rc.d nginx reload > /dev/null
|
||||
;;
|
||||
|
||||
ubuntu)
|
||||
sudo /etc/init.d/nginx reload > /dev/null
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user