aboutsummaryrefslogtreecommitdiff
path: root/scripts/backup
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/backup')
-rw-r--r--scripts/backup28
1 files changed, 11 insertions, 17 deletions
diff --git a/scripts/backup b/scripts/backup
index dbff544..c5a4702 100644
--- a/scripts/backup
+++ b/scripts/backup
@@ -24,13 +24,15 @@ ynh_print_info "Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME
-# Retrieve app settings
-domain=$(ynh_app_setting_get "$app" domain)
-final_path=$(ynh_app_setting_get "$app" final_path)
-db_name=$(ynh_app_setting_get "$app" db_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)
+
+#=================================================
+# STOP MASTODON SERVICES
+#=================================================
+ynh_print_info "Stopping Mastodon Services..."
-# Stop Mastodon Services
-# Restart Mastodon
yunohost service stop "$app-web"
yunohost service stop "$app-sidekiq"
yunohost service stop "$app-streaming"
@@ -58,7 +60,6 @@ ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_print_info "Backing up the PostgreSQL database..."
ynh_psql_dump_db "$db_name" > db.sql
-ynh_backup "db.sql"
#=================================================
# SPECIFIC BACKUP
@@ -72,16 +73,15 @@ ynh_backup "/etc/systemd/system/$app-sidekiq.service"
ynh_backup "/etc/systemd/system/$app-streaming.service"
#=================================================
-# BACKUP THE CRON FILE
+# BACKUP A CRON FILE
#=================================================
ynh_backup "/etc/cron.d/$app"
#=================================================
-# BACKUP THE sources.list FILES
+# START MASTODON SERVICES
#=================================================
-
-ynh_backup "/etc/apt/sources.list.d/yarn.list" "apt_yarn.list"
+ynh_print_info "Starting Mastodon Services..."
yunohost service start "$app-web"
yunohost service start "$app-sidekiq"
@@ -91,12 +91,6 @@ yunohost service start "$app-streaming"
sleep 30
#=================================================
-# RELOAD NGINX
-#=================================================
-
-systemctl reload nginx
-
-#=================================================
# END OF SCRIPT
#=================================================