fix problem when sv and systemctl exists at the same time in ubuntu, core command related dokku nginx plugin will fail.
This will happend when an ubuntu server upgrade from early version.
This commit is contained in:
@@ -149,10 +149,10 @@ fn-nginx-vhosts-nginx-init-cmd() {
|
||||
|
||||
ubuntu)
|
||||
# support docker-based installations
|
||||
if [[ -x /usr/bin/sv ]]; then
|
||||
sudo /usr/bin/sv "$CMD" "$NGINX_INIT_NAME"
|
||||
elif [[ -x /usr/bin/systemctl ]]; then
|
||||
if [[ -x /usr/bin/systemctl ]]; then
|
||||
sudo /usr/bin/systemctl "$CMD" "$NGINX_INIT_NAME"
|
||||
elif [[ -x /usr/bin/sv ]]; then
|
||||
sudo /usr/bin/sv "$CMD" "$NGINX_INIT_NAME"
|
||||
elif [[ "$CMD" == "enable" ]] || [[ "$CMD" == "disable" ]]; then
|
||||
dokku_log_warn "Running $CMD is not possible for init.d managed services"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user