mirror of https://github.com/samply/bridgehead.git
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}"
|
cat <<EOF > /etc/sudoers.d/bridgehead-"${PROJECT}"
|
||||||
# This has been added by the Bridgehead installer. Remove with bridgehead uninstall.
|
# This has been added by the Bridgehead installer. Remove with bridgehead uninstall.
|
||||||
Cmnd_Alias BRIDGEHEAD${PROJECT} = \\
|
Cmnd_Alias BRIDGEHEAD${PROJECT^^} = \\
|
||||||
/bin/systemctl start bridgehead@${PROJECT}.service, \\
|
/bin/systemctl start bridgehead@${PROJECT}.service, \\
|
||||||
/bin/systemctl stop bridgehead@${PROJECT}.service, \\
|
/bin/systemctl stop bridgehead@${PROJECT}.service, \\
|
||||||
/bin/systemctl restart 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
|
EOF
|
||||||
|
|
||||||
log "INFO" "Register system units for bridgehead and bridgehead-update"
|
log "INFO" "Register system units for bridgehead and bridgehead-update"
|
||||||
|
|
|
@ -70,7 +70,7 @@ done
|
||||||
# If anything is updated, restart service
|
# If anything is updated, restart service
|
||||||
if [ $git_updated = "true" ] || [ $docker_updated = "true" ]; then
|
if [ $git_updated = "true" ] || [ $docker_updated = "true" ]; then
|
||||||
log "INFO" "Update detected, now restarting bridgehead"
|
log "INFO" "Update detected, now restarting bridgehead"
|
||||||
systemctl restart 'bridgehead@*'
|
sudo /bin/systemctl restart bridgehead@*.service
|
||||||
else
|
else
|
||||||
log "INFO" "Nothing updated, nothing to restart."
|
log "INFO" "Nothing updated, nothing to restart."
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue