Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rn2_uninstall.sh - Fixing an oddity when service is recreated after being disabled during uninstall #1045

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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