Update deployment
This commit is contained in:
parent
7692c4e889
commit
d89c08702c
|
@ -22,12 +22,13 @@ log "INFO" "Allowing the bridgehead user to start/stop the bridgehead."
|
|||
|
||||
cat <<EOF > /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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue