Skip to content

Commit

Permalink
Update rn2_uninstall.sh (#1045)
Browse files Browse the repository at this point in the history
Commenting out systemctl disable service because disable causes it to remain disabled even after the service is removed and reinstalled by Ansible 
	
Commenting out the disable command has no impact since it will be removed when removing packages
  • Loading branch information
creas002 authored Aug 12, 2024
1 parent fb5b46f commit 0f45098
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ansible/roles/common/files/rn2_uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,12 @@ remove_services() {
do

loggit "INFO" "Stopping and removing ${svc} service"
sudo sudo systemctl stop ${svc}
sudo sudo systemctl disable ${svc}
sudo systemctl stop ${svc}
# Disable causes it to remain disabled even after the service is removed and reinstalled by Ansible
# this is because disable removes /etc/systemd/system/multi-user.target.wants/nginx.service and is not added back when Ansible installs it.
# If Ansible had issued an systemctl enable nsinx enable it would worked.
# Commenting out the disable command because disabling the service is no impact since it will be removed when removing packages
# sudo systemctl disable ${svc}

done

Expand Down

0 comments on commit 0f45098

Please sign in to comment.