From f933d4089625f8d28485cd633fc4c795e4f964eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Fri, 27 Mar 2020 13:55:02 +0100 Subject: [PATCH] Fix start service managment and listen only on localhost --- conf/app.ini | 1 + scripts/change_url | 2 +- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/conf/app.ini b/conf/app.ini index 9c557f0..9f00522 100644 --- a/conf/app.ini +++ b/conf/app.ini @@ -20,6 +20,7 @@ FORCE_PRIVATE = false [server] DOMAIN = __DOMAIN__ HTTP_PORT = __PORT__ +HTTP_ADDR = 127.0.0.1 ROOT_URL = https://__URL__/ DISABLE_SSH = false SSH_PORT = __SSH_PORT__ diff --git a/scripts/change_url b/scripts/change_url index c14ee9d..a57b886 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -55,7 +55,7 @@ config_gitea # RELOAD services ynh_script_progression --message="Starting services..." -ynh_systemd_action -l "Serving \[::\]:$port with pid" -p "/var/log/$app/gitea.log" -a restart -t 10 +ynh_systemd_action -l "Starting new server: tcp:127.0.0.1:" -p "/var/log/$app/gitea.log" -t 10 sleep 1 # Store the checksum with the 'INTERNAL_TOKEN' value. diff --git a/scripts/install b/scripts/install index 1082312..57901c4 100644 --- a/scripts/install +++ b/scripts/install @@ -126,7 +126,7 @@ ynh_app_setting_set --app $app --key upstream_version --value $(ynh_app_upstream # Reload services ynh_script_progression --message="Starting gitea services..." --weight=3 -ynh_systemd_action -l "Serving \[::\]:$port with pid" -p "/var/log/$app/gitea.log" -t 10 +ynh_systemd_action -l "Starting new server: tcp:127.0.0.1:" -p "/var/log/$app/gitea.log" -t 10 sleep 1 # Store the checksum with the 'INTERNAL_TOKEN' value. diff --git a/scripts/restore b/scripts/restore index b486eab..49ab3e8 100644 --- a/scripts/restore +++ b/scripts/restore @@ -78,7 +78,7 @@ yunohost service add "$app" --log /var/log/"$app"/gitea.log # Reload services ynh_script_progression --message="Reloading services..." systemctl reload nginx.service -ynh_systemd_action -l "Serving \[::\]:$port with pid" -p "/var/log/$app/gitea.log" -t 10 +ynh_systemd_action -l "Starting new server: tcp:127.0.0.1:" -p "/var/log/$app/gitea.log" -t 10 sleep 1 ynh_script_progression --message="Restoration completed for $app" --last diff --git a/scripts/upgrade b/scripts/upgrade index 4a969ad..58eccbf 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -202,7 +202,7 @@ set_access_settings # Reload services ynh_script_progression --message="Starting gitea services..." --weight=3 -ynh_systemd_action -l "Serving \[::\]:$port with pid" -p "/var/log/$app/gitea.log" -t 10 +ynh_systemd_action -l "Starting new server: tcp:127.0.0.1:" -p "/var/log/$app/gitea.log" -t 10 sleep 1 # Store the checksum with the 'INTERNAL_TOKEN' value.