mirror of
				https://github.com/samply/bridgehead.git
				synced 2025-11-04 10:40:18 +01:00 
			
		
		
		
	Update deployment
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user