Parcourir la source

Rewriting packages scripts. backup (WIP).

pitchum il y a 7 ans
Parent
commit
2e75787914
1 fichiers modifiés avec 17 ajouts et 1 suppressions
  1. 17 1
      scripts/backup

+ 17 - 1
scripts/backup

@@ -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
@@ -28,6 +29,20 @@ 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)
 
 #=================================================
 # STANDARD BACKUP STEPS
@@ -59,3 +74,4 @@ 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"