Merge pull request #4888 from dokku/proper-raspbian-install

Ensure installations treat raspbian as similar to debian buster as possible
This commit is contained in:
Jose Diaz-Gonzalez
2021-10-28 02:42:02 -04:00
committed by GitHub
7 changed files with 14 additions and 24 deletions

View File

@@ -189,7 +189,7 @@ install-dokku-from-deb-package() {
fi
OS_ID="$(lsb_release -cs 2>/dev/null || echo "bionic")"
if ! in-array "$DOKKU_DISTRO" "debian" "ubuntu"; then
if ! in-array "$DOKKU_DISTRO" "debian" "ubuntu" "raspbian"; then
DOKKU_DISTRO="ubuntu"
OS_ID="bionic"
fi
@@ -204,6 +204,11 @@ install-dokku-from-deb-package() {
if ! in-array "$OS_ID" "${OS_IDS[@]}"; then
OS_ID="bullseye"
fi
elif [[ "$DOKKU_DISTRO" == "raspbian" ]]; then
OS_IDS=("buster")
if ! in-array "$OS_ID" "${OS_IDS[@]}"; then
OS_ID="buster"
fi
fi
echo "--> Installing dokku"

View File

@@ -433,7 +433,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
export DEBIAN_FRONTEND=noninteractive
case "$DOKKU_DISTRO" in
debian|ubuntu)
debian|raspbian|ubuntu)
apt-get -qq -y --no-install-recommends install nginx
;;

View File

@@ -17,7 +17,7 @@ trigger-events-install() {
# shellcheck disable=SC2174
mkdir -m 775 -p "$DOKKU_LOGS_DIR"
case "$DOKKU_DISTRO" in
arch | debian | centos | fedora | rhel)
arch | debian | centos | fedora | raspbian | rhel)
chgrp dokku "$DOKKU_LOGS_DIR"
;;
*)
@@ -28,7 +28,7 @@ trigger-events-install() {
if [[ ! -f "$DOKKU_EVENTS_LOGFILE" ]]; then
touch "$DOKKU_EVENTS_LOGFILE"
case "$DOKKU_DISTRO" in
arch | debian | centos | fedora | rhel)
arch | debian | centos | fedora | raspbian | rhel)
chgrp dokku "$DOKKU_EVENTS_LOGFILE"
;;
*)
@@ -70,7 +70,7 @@ $DOKKU_LOGS_DIR/*.log {
}
EOF
if [[ "$DOKKU_DISTRO" == "debian" ]]; then
if [[ "$DOKKU_DISTRO" == "debian" ]] || [[ "$DOKKU_DISTRO" == "raspbian" ]]; then
sed -i 's/ syslog dokku$/ root dokku/g' $DOKKU_LOGROTATE_FILE
fi

View File

@@ -34,7 +34,7 @@ trigger-nginx-vhosts-dependencies() {
declare trigger="dependencies"
case "$DOKKU_DISTRO" in
debian)
debian | raspbian)
nginx_install
;;

View File

@@ -25,7 +25,7 @@ trigger-nginx-vhosts-install() {
fi
case "$DOKKU_DISTRO" in
debian)
debian | raspbian)
echo "%dokku ALL=(ALL) NOPASSWD:/usr/sbin/invoke-rc.d $NGINX_INIT_NAME reload, $NGINX_BIN -t, ${NGINX_BIN} -t -c *" >"$NGINX_SUDOERS_FILE"
;;

View File

@@ -102,7 +102,7 @@ fn-nginx-vhosts-nginx-init-cmd() {
fi
case "$DOKKU_DISTRO" in
debian)
debian | raspbian)
sudo /usr/sbin/invoke-rc.d "$NGINX_INIT_NAME" "$CMD"
;;

View File

@@ -12,22 +12,7 @@ trigger-storage-install() {
STORAGE_SUDOERS_FILE="/etc/sudoers.d/dokku-storage"
case "$DOKKU_DISTRO" in
debian)
echo "%dokku ALL=(ALL) NOPASSWD:$PLUGIN_AVAILABLE_PATH/storage/bin/chown-storage-dir *" >"$STORAGE_SUDOERS_FILE"
echo "Defaults env_keep += \"DOKKU_LIB_ROOT\"" >>"$STORAGE_SUDOERS_FILE"
;;
ubuntu)
echo "%dokku ALL=(ALL) NOPASSWD:$PLUGIN_AVAILABLE_PATH/storage/bin/chown-storage-dir *" >"$STORAGE_SUDOERS_FILE"
echo "Defaults env_keep += \"DOKKU_LIB_ROOT\"" >>"$STORAGE_SUDOERS_FILE"
;;
opensuse)
echo "%dokku ALL=(ALL) NOPASSWD:$PLUGIN_AVAILABLE_PATH/storage/bin/chown-storage-dir *" >"$STORAGE_SUDOERS_FILE"
echo "Defaults env_keep += \"DOKKU_LIB_ROOT\"" >>"$STORAGE_SUDOERS_FILE"
;;
arch)
arch | debian | opensuse | raspbian | ubuntu)
echo "%dokku ALL=(ALL) NOPASSWD:$PLUGIN_AVAILABLE_PATH/storage/bin/chown-storage-dir *" >"$STORAGE_SUDOERS_FILE"
echo "Defaults env_keep += \"DOKKU_LIB_ROOT\"" >>"$STORAGE_SUDOERS_FILE"
;;