diff --git a/scripts/backup b/scripts/backup index 749292f..b00dc77 100644 --- a/scripts/backup +++ b/scripts/backup @@ -29,7 +29,6 @@ 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 diff --git a/scripts/remove b/scripts/remove index 6512c61..e245418 100644 --- a/scripts/remove +++ b/scripts/remove @@ -20,9 +20,7 @@ domain=$(ynh_app_setting_get $app domain) final_path=$(ynh_app_setting_get $app final_path) -sync_home=$(ynh_app_setting_get $app sync_home) sync_port=$(ynh_app_setting_get $app sync_port) -gui_port=$(ynh_app_setting_get $app gui_port) #================================================= # STANDARD REMOVE diff --git a/scripts/restore b/scripts/restore index b933e6e..ad00d56 100644 --- a/scripts/restore +++ b/scripts/restore @@ -30,7 +30,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get $app domain) path_url=$(ynh_app_setting_get $app path) final_path=$(ynh_app_setting_get $app final_path) -db_name=$(ynh_app_setting_get $app db_name) +sync_home=$(ynh_app_setting_get $app sync_home) #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -74,6 +74,15 @@ chown -R "$app": $final_path #================================================= # SPECIFIC RESTORATION +#================================================= +# RECREATE SYNC DIRECTORY +#================================================= +ynh_print_info "Recreating sync directory..." + +# Make directories and set rights +mkdir -p "$sync_home" +chown -R "$app": "$sync_home" + #================================================= # RESTORE SYSTEMD #================================================= @@ -102,8 +111,7 @@ systemctl reload nginx #================================================= ynh_print_info "Starting Syncthing services..." -ynh_systemd_action --action=start --service_name=$app --log_path=systemd -#--line_match="Started $app" +ynh_systemd_action --action=start --service_name=$app --log_path=systemd --line_match="Access the GUI via the following URL" #================================================= # END OF SCRIPT