force_backup 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. # RETRIEVE ARGUMENTS
  11. #=================================================
  12. app=${YNH_APP_INSTANCE_NAME:-$YNH_APP_ID}
  13. final_path=$(ynh_app_setting_get --app=$app --key=final_path)
  14. #=================================================
  15. # CHECK IF ARGUMENTS ARE CORRECT
  16. #=================================================
  17. #=================================================
  18. # CHECK IF AN ACTION HAS TO BE DONE
  19. #=================================================
  20. #=================================================
  21. # SPECIFIC ACTION
  22. #=================================================
  23. # FORCE A NEW BACKUP
  24. #=================================================
  25. ynh_script_progression --message="Forcing a new backup..." --weight=9
  26. ynh_exec_warn nice -n10 $final_path/archivist.sh
  27. #=================================================
  28. # END OF SCRIPT
  29. #=================================================
  30. ynh_script_progression --message="Execution completed" --last