From 5311d616b55fd6c24ffb31c1f22a8f733bdf9b7c Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 27 Dec 2023 15:40:05 +0100 Subject: [PATCH 1/5] Wait for the service to be fully started (db init) --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 6cf9a01..b19147b 100644 --- a/scripts/install +++ b/scripts/install @@ -200,7 +200,7 @@ ynh_script_progression --message="Starting a systemd service..." mkdir -p "/var/log/$app" chown -R $app:$app "/var/log/$app" # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Started" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="HTTP server listening on localhost" #================================================= # INSTALL LDAP PLUGIN From d3a4f2bd62ef894a46cb92c0f4daac079823d51e Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 27 Dec 2023 15:40:25 +0100 Subject: [PATCH 2/5] Wait for the service to be fully started (db init) --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 775df02..f92c1c2 100644 --- a/scripts/restore +++ b/scripts/restore @@ -144,7 +144,7 @@ yunohost service add $app --description="$app daemon for Peertube" --log="/var/l #================================================= ynh_script_progression --message="Starting a systemd service..." -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Started" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="HTTP server listening on localhost" #================================================= # GENERIC FINALIZATION From 4fb28b6a6f1bc90bf16993fee606117c74210f7d Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 27 Dec 2023 15:41:12 +0100 Subject: [PATCH 3/5] Wait for the service to be fully started (db init) Only on first service start (should be done during the second one) --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 86deeeb..97665ff 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -260,7 +260,7 @@ ynh_script_progression --message="Starting a systemd service..." mkdir -p "/var/log/$app" chown -R $app:$app "/var/log/$app" # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Started" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="HTTP server listening on localhost" #================================================= # INSTALL LDAP PLUGIN From f6eff70b3ffae7e1a2d10cf8acf60588a15b789d Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 27 Dec 2023 17:02:36 +0100 Subject: [PATCH 4/5] localhost doesn't work And is less reliable (could be IPV6) --- conf/production.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/production.yaml b/conf/production.yaml index 28731b5..b6bf194 100644 --- a/conf/production.yaml +++ b/conf/production.yaml @@ -1,5 +1,5 @@ listen: - hostname: 'localhost' + hostname: '127.0.0.1' port: __PORT__ # Correspond to your reverse proxy server_name/listen configuration (i.e., your public PeerTube instance URL) From 2b637ec674e56ed7fc1ecee4af27309f3ae73d43 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 27 Dec 2023 17:04:21 +0100 Subject: [PATCH 5/5] reverts https://github.com/YunoHost-Apps/peertube_ynh/pull/397 as it's a different PR --- scripts/install | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/install b/scripts/install index 6cf9a01..e53392d 100644 --- a/scripts/install +++ b/scripts/install @@ -164,7 +164,6 @@ ynh_script_progression --message="Building Yarn dependencies..." pushd "$final_path" ynh_use_nodejs npm install -g npm - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn config set network-timeout 300000 ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --production --pure-lockfile ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn cache clean popd