Skip to content

Commit

Permalink
[docker] fix access to DBus when restarting container / rebooting host (
Browse files Browse the repository at this point in the history
  • Loading branch information
bouvrais authored Oct 12, 2024
1 parent 3e9be20 commit af26b01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script/_initrc
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ start_service()
stop_service()
{
local service_name=$1
if $HAVE_SYSTEMCTL; then
if [[ ${HAVE_SYSTEMCTL} == 1 ]]; then
systemctl is-active "$service_name" && sudo systemctl stop "$service_name" || echo "Failed to stop $service_name!"
elif $HAVE_SERVICE; then
elif [[ ${HAVE_SERVICE} == 1 ]]; then
sudo service "$service_name" status && sudo service "$service_name" stop || echo "Failed to stop $service_name!"
else
die 'Unable to find service manager. Try script/console to stop in console mode!'
Expand Down

0 comments on commit af26b01

Please sign in to comment.