remove 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/bin/bash
  2. #=================================================
  3. # GENERIC START
  4. #=================================================
  5. # IMPORT GENERIC HELPERS
  6. #=================================================
  7. source _common.sh
  8. source /usr/share/yunohost/helpers
  9. #=================================================
  10. # STANDARD REMOVE
  11. #=================================================
  12. # REMOVE SERVICE INTEGRATION IN YUNOHOST
  13. #=================================================
  14. ynh_script_progression --message="Removing system configurations related to $app..." --weight=5
  15. # Stop flohmarkt service
  16. ynh_script_progression --message="Stopping $app..." --weight=2
  17. yunohost service stop $app
  18. # Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
  19. if ynh_exec_warn_less yunohost service status $app >/dev/null
  20. then
  21. ynh_script_progression --message="Removing $app service integration..." --weight=2
  22. yunohost service remove $app
  23. fi
  24. # Remove the app-specific logrotate config
  25. ynh_remove_logrotate
  26. # Remove the dedicated NGINX config
  27. ynh_remove_nginx_config
  28. # Remove the dedicated Fail2Ban config
  29. ynh_remove_fail2ban_config
  30. #=================================================
  31. # END OF SCRIPT
  32. #=================================================
  33. ynh_script_progression --message="Removal of $app completed" --last