Rewriting packages scripts. backup (WIP).
This commit is contained in:
@@ -18,7 +18,8 @@ source /usr/share/yunohost/helpers
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
ynh_abort_if_errors # Stop script if an error is detected
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
@@ -26,6 +27,20 @@ ynh_abort_if_errors # Stop script if an error is detected
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
final_path=$(ynh_app_setting_get $app final_path)
|
||||
domain=$(ynh_app_setting_get $app domain)
|
||||
db_name=$(ynh_app_setting_get $app db_name)
|
||||
|
||||
#=================================================
|
||||
# STANDARD BACKUP STEPS
|
||||
#=================================================
|
||||
# BACKUP THE APP MAIN DIR
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
final_path=$(ynh_app_setting_get $app final_path)
|
||||
domain=$(ynh_app_setting_get $app domain)
|
||||
|
||||
@@ -59,4 +74,6 @@ ynh_backup "/etc/systemd/system/ynh-$app.service" # XXX maybe hard-coding the fu
|
||||
ynh_backup "/etc/systemd/system/ynh-$app-checker.service" # XXX maybe hard-coding the full name would be better
|
||||
ynh_backup "/etc/systemd/system/ynh-$app-checker.timer" # XXX maybe hard-coding the full name would be better
|
||||
|
||||
ynh_backup "/etc/cron.d/$app"
|
||||
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user