remove 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. # Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
  16. if ynh_exec_warn_less yunohost service status $app >/dev/null
  17. then
  18. ynh_script_progression --message="Removing $app service integration..." --weight=2
  19. yunohost service remove $app
  20. fi
  21. # Remove the app-specific logrotate config
  22. ynh_remove_logrotate
  23. # Remove the dedicated NGINX config
  24. ynh_remove_nginx_config
  25. # Remove the dedicated Fail2Ban config
  26. ynh_remove_fail2ban_config
  27. #=================================================
  28. # END OF SCRIPT
  29. #=================================================
  30. ynh_script_progression --message="Removal of $app completed" --last