1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/glitchsoc_ynh.git synced 2024-09-03 19:15:59 +02:00

Fix upgrade

This commit is contained in:
Salamandar 2024-03-24 22:51:02 +01:00
parent 79865d0fc3
commit 7621990818

View file

@ -30,9 +30,9 @@ ynh_remove_extra_repo
#================================================= #=================================================
ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --service_name="${app}-web" --action="stop" --log_path="/var/log/$app/$app-web.log" --line_match="Goodbye" ynh_systemd_action --service_name="${app}-web" --action="stop" --log_path="/var/log/$app/$app-web.log"
ynh_systemd_action --service_name="${app}-sidekiq" --action="stop" --log_path="/var/log/$app/$app-sidekiq.log" --line_match="Bye" ynh_systemd_action --service_name="${app}-sidekiq" --action="stop" --log_path="/var/log/$app/$app-sidekiq.log"
ynh_systemd_action --service_name="${app}-streaming" --action="stop" --log_path="/var/log/$app/$app-streaming.log" --line_match="exiting" ynh_systemd_action --service_name="${app}-streaming" --action="stop" --log_path="/var/log/$app/$app-streaming.log"
# Rename the database to match packaging v2 defaults db_name (`$app_production` to `$app`) # Rename the database to match packaging v2 defaults db_name (`$app_production` to `$app`)
if [[ $db_name = *'_production' ]]; then if [[ $db_name = *'_production' ]]; then
@ -134,13 +134,13 @@ ynh_add_nginx_config
ynh_use_ruby ynh_use_ruby
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config --service="$app-web" --template="mastodon-web.service" ynh_add_systemd_config --service="$app-web" --template="glitchsoc-web.service"
yunohost service add "$app-web" --description="$app web service" yunohost service add "$app-web" --description="$app web service"
ynh_add_systemd_config --service="$app-sidekiq" --template="mastodon-sidekiq.service" ynh_add_systemd_config --service="$app-sidekiq" --template="glitchsoc-sidekiq.service"
yunohost service add "$app-sidekiq" --description="$app sidekiq service" yunohost service add "$app-sidekiq" --description="$app sidekiq service"
ynh_add_systemd_config --service="$app-streaming" --template="mastodon-streaming.service" ynh_add_systemd_config --service="$app-streaming" --template="glitchsoc-streaming.service"
yunohost service add "$app-streaming" --description="$app streaming service" yunohost service add "$app-streaming" --description="$app streaming service"
ynh_add_config --template="cron" --destination="/etc/cron.d/$app" ynh_add_config --template="cron" --destination="/etc/cron.d/$app"