2018-07-21 19:42:17 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC STARTING
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source scripts/_common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2020-04-08 20:00:29 +02:00
|
|
|
#=================================================
|
|
|
|
# MANAGE SCRIPT FAILURE
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
# Exit if an error occurs during the execution of the script
|
|
|
|
ynh_abort_if_errors
|
|
|
|
|
2018-07-21 19:42:17 +02:00
|
|
|
#=================================================
|
|
|
|
# RETRIEVE ARGUMENTS
|
|
|
|
#=================================================
|
|
|
|
|
2018-09-30 20:01:19 +02:00
|
|
|
app=${YNH_APP_INSTANCE_NAME:-$YNH_APP_ID}
|
2018-07-21 19:42:17 +02:00
|
|
|
|
2019-05-26 17:00:09 +02:00
|
|
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
2018-07-21 19:42:17 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# CHECK IF ARGUMENTS ARE CORRECT
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# CHECK IF AN ACTION HAS TO BE DONE
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# SPECIFIC ACTION
|
|
|
|
#=================================================
|
|
|
|
# FORCE A NEW BACKUP
|
|
|
|
#=================================================
|
2019-05-26 17:00:09 +02:00
|
|
|
ynh_script_progression --message="Forcing a new backup..." --weight=9
|
2018-07-21 19:42:17 +02:00
|
|
|
|
|
|
|
ynh_exec_warn nice -n10 $final_path/archivist.sh
|
2019-01-30 16:07:38 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_script_progression --message="Execution completed" --last
|