2
0

remove 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. # LOAD SETTINGS
  11. #=================================================
  12. app=$YNH_APP_INSTANCE_NAME
  13. final_path=$(ynh_app_setting_get $app final_path)
  14. #=================================================
  15. # STANDARD REMOVE
  16. #=================================================
  17. # REMOVE DEPENDENCIES
  18. #=================================================
  19. # Remove metapackage and its dependencies
  20. ynh_remove_app_dependencies
  21. #=================================================
  22. # REMOVE APP MAIN DIR
  23. #=================================================
  24. # Remove the app directory securely
  25. ynh_secure_remove "$final_path"
  26. #=================================================
  27. # REMOVE LOGROTATE CONFIGURATION
  28. #=================================================
  29. # Remove the app-specific logrotate config
  30. ynh_remove_logrotate
  31. #=================================================
  32. # SPECIFIC REMOVE
  33. #=================================================
  34. # REMOVE THE CRON FILE
  35. #=================================================
  36. # Remove a cron file
  37. ynh_secure_remove "/etc/cron.d/$app"
  38. # Remove the backup directory
  39. ynh_secure_remove "/home/yunohost.app/${app}_backup"