diff options
| author | yalh76 <yalh@yahoo.com> | 2019-03-21 02:07:49 +0100 |
|---|---|---|
| committer | yalh76 <yalh@yahoo.com> | 2019-03-21 02:07:49 +0100 |
| commit | 1d2c258abe21e48a32da63c8a90573c95a6bd773 (patch) | |
| tree | 277e66a86df804ba6f4e0d78d6bcb7f06f4096f8 /scripts/backup | |
| parent | f8096d8c256c021d290701b41767b77fdecef1c1 (diff) | |
| download | mastodon_ynh-1d2c258abe21e48a32da63c8a90573c95a6bd773.tar.gz mastodon_ynh-1d2c258abe21e48a32da63c8a90573c95a6bd773.tar.bz2 mastodon_ynh-1d2c258abe21e48a32da63c8a90573c95a6bd773.zip | |
Apply example_ynh
Diffstat (limited to 'scripts/backup')
| -rw-r--r-- | scripts/backup | 28 |
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 #================================================= |
