aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authoreric_G <46165813+ericgaspar@users.noreply.github.com>2025-11-08 15:50:43 +0100
committereric_G <46165813+ericgaspar@users.noreply.github.com>2025-11-08 15:50:43 +0100
commit7c7f8f3331184f9e89f920857f9fda7653d3b8b6 (patch)
tree673eb524ee42215d2195c2ad74661bd1e39aad5c /scripts
parenteff8205f770de5d473297f4691e62cd01e14fc73 (diff)
downloadmastodon_ynh-7c7f8f3331184f9e89f920857f9fda7653d3b8b6.tar.gz
mastodon_ynh-7c7f8f3331184f9e89f920857f9fda7653d3b8b6.tar.bz2
mastodon_ynh-7c7f8f3331184f9e89f920857f9fda7653d3b8b6.zip
cleaning
Diffstat (limited to 'scripts')
-rw-r--r--scripts/backup14
-rw-r--r--scripts/install8
-rw-r--r--scripts/restore6
-rw-r--r--scripts/upgrade10
4 files changed, 15 insertions, 23 deletions
diff --git a/scripts/backup b/scripts/backup
index 5172032..ee972d8 100644
--- a/scripts/backup
+++ b/scripts/backup
@@ -13,25 +13,17 @@ ynh_print_info "Declaring files to be backed up..."
ynh_backup "$install_dir"
#=================================================
-# BACKUP THE NGINX CONFIGURATION
+# BACKUP SYSTEM CONFIGURATION
#=================================================
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
-#=================================================
-# BACKUP LOGROTATE
-#=================================================
-
-ynh_backup "/etc/logrotate.d/$app"
-
-#=================================================
-# BACKUP SYSTEMD
-#=================================================
-
ynh_backup "/etc/systemd/system/$app-web.service"
ynh_backup "/etc/systemd/system/$app-sidekiq.service"
ynh_backup "/etc/systemd/system/$app-streaming.service"
+ynh_backup "/etc/logrotate.d/$app"
+
#=================================================
# BACKUP VARIOUS FILES
#=================================================
diff --git a/scripts/install b/scripts/install
index ddff21c..1147c6a 100644
--- a/scripts/install
+++ b/scripts/install
@@ -141,12 +141,12 @@ ynh_config_add_logrotate
#=================================================
ynh_script_progression "Starting all systemd services..."
-ynh_systemctl --service=${app}-web --action="start" --log_path=/var/log/$app/$app-web.log --wait_until="Listening on"
-ynh_systemctl --service=${app}-sidekiq --action="start" --log_path=/var/log/$app/$app-sidekiq.log --wait_until="Schedules Loaded"
-ynh_systemctl --service=${app}-streaming --action="start" --log_path=/var/log/$app/$app-streaming.log --wait_until="Streaming API now listening"
+ynh_systemctl --service=${app}-web --action="start" --log_path=/var/log/$app/$app-web.log #--wait_until="Listening on"
+ynh_systemctl --service=${app}-sidekiq --action="start" --log_path=/var/log/$app/$app-sidekiq.log #--wait_until="Schedules Loaded"
+ynh_systemctl --service=${app}-streaming --action="start" --log_path=/var/log/$app/$app-streaming.log #--wait_until="Streaming API now listening"
#=================================================
# END OF SCRIPT
#=================================================
-ynh_script_progression "Installation of $app completed" \ No newline at end of file
+ynh_script_progression "Installation of $app completed"
diff --git a/scripts/restore b/scripts/restore
index 2491c12..5d3274c 100644
--- a/scripts/restore
+++ b/scripts/restore
@@ -73,9 +73,9 @@ ynh_restore "/etc/logrotate.d/$app"
#=================================================
ynh_script_progression "Reloading NGINX web server and $app's service..."
-ynh_systemctl --service=${app}-web --action="start" --log_path=/var/log/$app/$app-web.log --wait_until="Listening on"
-ynh_systemctl --service=${app}-sidekiq --action="start" --log_path=/var/log/$app/$app-sidekiq.log --wait_until="Schedules Loaded"
-ynh_systemctl --service=${app}-streaming --action="start" --log_path=/var/log/$app/$app-streaming.log --wait_until="Streaming API now listening"
+ynh_systemctl --service=${app}-web --action="start" --log_path=/var/log/$app/$app-web.log #--wait_until="Listening on"
+ynh_systemctl --service=${app}-sidekiq --action="start" --log_path=/var/log/$app/$app-sidekiq.log #--wait_until="Schedules Loaded"
+ynh_systemctl --service=${app}-streaming --action="start" --log_path=/var/log/$app/$app-streaming.log #--wait_until="Streaming API now listening"
ynh_systemctl --service=nginx --action=reload
diff --git a/scripts/upgrade b/scripts/upgrade
index 24b131e..f1f29d1 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -17,8 +17,8 @@ fi
#=================================================
ynh_script_progression "Stopping $app's systemd service..."
-ynh_systemctl --service=${app}-web --action="stop" --log_path=/var/log/$app/$app-web.log --wait_until="Goodbye"
-ynh_systemctl --service=${app}-sidekiq --action="stop" --log_path=/var/log/$app/$app-sidekiq.log --wait_until="Bye"
+ynh_systemctl --service=${app}-web --action="stop" --log_path=/var/log/$app/$app-web.log
+ynh_systemctl --service=${app}-sidekiq --action="stop" --log_path=/var/log/$app/$app-sidekiq.log
ynh_systemctl --service=${app}-streaming --action="stop" --log_path=/var/log/$app/$app-streaming.log
#=================================================
@@ -152,9 +152,9 @@ popd
#=================================================
ynh_script_progression "Starting $app's systemd service..."
-ynh_systemctl --service=${app}-web --action="restart" --log_path=/var/log/$app/$app-web.log --wait_until="Listening on"
-ynh_systemctl --service=${app}-sidekiq --action="start" --log_path=/var/log/$app/$app-sidekiq.log --wait_until="Schedules Loaded"
-ynh_systemctl --service=${app}-streaming --action="start" --log_path=/var/log/$app/$app-streaming.log --wait_until="Streaming API now listening"
+ynh_systemctl --service=${app}-web --action="restart" --log_path=/var/log/$app/$app-web.log #--wait_until="Listening on"
+ynh_systemctl --service=${app}-sidekiq --action="start" --log_path=/var/log/$app/$app-sidekiq.log #--wait_until="Schedules Loaded"
+ynh_systemctl --service=${app}-streaming --action="start" --log_path=/var/log/$app/$app-streaming.log #--wait_until="Streaming API now listening"
#=================================================
# END OF SCRIPT