2
0

force_backup 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/bin/bash
  2. #=================================================
  3. # GENERIC STARTING
  4. #=================================================
  5. # IMPORT GENERIC HELPERS
  6. #=================================================
  7. source scripts/_common.sh
  8. source /usr/share/yunohost/helpers
  9. #=================================================
  10. # MANAGE SCRIPT FAILURE
  11. #=================================================
  12. # Exit if an error occurs during the execution of the script
  13. ynh_abort_if_errors
  14. #=================================================
  15. # RETRIEVE ARGUMENTS
  16. #=================================================
  17. app=${YNH_APP_INSTANCE_NAME:-$YNH_APP_ID}
  18. final_path=$(ynh_app_setting_get --app=$app --key=final_path)
  19. #=================================================
  20. # CHECK IF ARGUMENTS ARE CORRECT
  21. #=================================================
  22. #=================================================
  23. # CHECK IF AN ACTION HAS TO BE DONE
  24. #=================================================
  25. #=================================================
  26. # SPECIFIC ACTION
  27. #=================================================
  28. # FORCE A NEW BACKUP
  29. #=================================================
  30. ynh_script_progression --message="Forcing a new backup..." --weight=9
  31. ynh_exec_warn nice -n10 $final_path/archivist.sh
  32. #=================================================
  33. # END OF SCRIPT
  34. #=================================================
  35. ynh_script_progression --message="Execution completed" --last