diff --git a/lib/setup-bridgehead-units.sh b/lib/setup-bridgehead-units.sh index f2c213c..a1393c2 100755 --- a/lib/setup-bridgehead-units.sh +++ b/lib/setup-bridgehead-units.sh @@ -22,12 +22,13 @@ log "INFO" "Allowing the bridgehead user to start/stop the bridgehead." cat < /etc/sudoers.d/bridgehead-"${PROJECT}" # This has been added by the Bridgehead installer. Remove with bridgehead uninstall. -Cmnd_Alias BRIDGEHEAD${PROJECT} = \\ - /bin/systemctl start bridgehead@${PROJECT}.service, \\ - /bin/systemctl stop bridgehead@${PROJECT}.service, \\ - /bin/systemctl restart bridgehead@${PROJECT}.service +Cmnd_Alias BRIDGEHEAD${PROJECT^^} = \\ + /bin/systemctl start bridgehead@${PROJECT}.service, \\ + /bin/systemctl stop bridgehead@${PROJECT}.service, \\ + /bin/systemctl restart bridgehead@${PROJECT}.service, \\ + /bin/systemctl restart bridgehead@*.service -bridgehead ALL= NOPASSWD: BRIDGEHEAD${PROJECT} +bridgehead ALL= NOPASSWD: BRIDGEHEAD${PROJECT^^} EOF log "INFO" "Register system units for bridgehead and bridgehead-update" diff --git a/lib/update-bridgehead.sh b/lib/update-bridgehead.sh index 9788ff1..9bb73bd 100755 --- a/lib/update-bridgehead.sh +++ b/lib/update-bridgehead.sh @@ -70,7 +70,7 @@ done # If anything is updated, restart service if [ $git_updated = "true" ] || [ $docker_updated = "true" ]; then log "INFO" "Update detected, now restarting bridgehead" - systemctl restart 'bridgehead@*' + sudo /bin/systemctl restart bridgehead@*.service else log "INFO" "Nothing updated, nothing to restart." fi