fix: detect and use systemd on Debian systems
Debian Bookworm completely removes invoke-rc.d, thus breaking interactions with nginx. Closes #6020
This commit is contained in:
1 parent
30a94d1f9d
commit
c44d779695
3 files changed
+12
-6
No files matched your search
@@ -125,7 +125,11 @@ fn-nginx-vhosts-nginx-init-cmd() {
|
||||
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian | raspbian)
|
||||
sudo /usr/sbin/invoke-rc.d "$NGINX_INIT_NAME" "$CMD"
|
||||
if [[ -x /usr/bin/systemctl ]]; then
|
||||
sudo /usr/bin/systemctl "$CMD" "$NGINX_INIT_NAME"
|
||||
else
|
||||
sudo /usr/sbin/invoke-rc.d "$NGINX_INIT_NAME" "$CMD"
|
||||
fi
|
||||
;;
|
||||
|
||||
ubuntu)
|
||||
|
||||
Reference in new issue
Block a user