From db0f0e367da4eda6af039ed49b1d4dcfd571ff5e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 8 Jul 2021 11:15:15 +0200 Subject: [PATCH 1/8] Fix --- conf/systemd.service | 2 +- scripts/install | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index dc1e7de..e769067 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -6,7 +6,7 @@ After=network-online.target [Service] Type=simple User=__APP__ -Group=nogroup +Group=__APP__ ExecStart=__FINALPATH__/dispatch Restart=on-failure RestartSec=5 diff --git a/scripts/install b/scripts/install index 982934a..f371fc8 100644 --- a/scripts/install +++ b/scripts/install @@ -115,8 +115,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=2 # Start a systemd service ynh_systemd_action --service_name=$app --action=start --log_path="systemd" -#sleep 60 - #================================================= # SETUP SSOWAT #================================================= From a13704092c003b3b7946ae0d14345c0d68844e84 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 8 Jul 2021 11:19:38 +0200 Subject: [PATCH 2/8] Fix --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index f371fc8..93ad826 100644 --- a/scripts/install +++ b/scripts/install @@ -113,7 +113,7 @@ yunohost service add $app --description="Web-based IRC client in Go" --log="/var ynh_script_progression --message="Starting a systemd service..." --weight=2 # Start a systemd service -ynh_systemd_action --service_name=$app --action=start --log_path="systemd" +ynh_systemd_action --service_name=$app --action=start --log_path="systemd" --line_match="Listening on port" #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index 23110a6..78b6f2b 100644 --- a/scripts/restore +++ b/scripts/restore @@ -90,7 +90,7 @@ yunohost service add $app --description="Web-based IRC client in Go" --log="/var #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action=start --log_path=systemd +ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Listening on port" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index b51807a..36b06d8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -116,7 +116,7 @@ yunohost service add $app --description="Web-based IRC client in Go" --log="/var #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action=start --log_path=systemd +ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Listening on port" #================================================= # RELOAD NGINX From ed1d6394afa034768054aee2a683beb7e4020c35 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 8 Jul 2021 11:27:51 +0200 Subject: [PATCH 3/8] Update check_process --- check_process | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index a0a8c6f..ddb1834 100644 --- a/check_process +++ b/check_process @@ -2,18 +2,27 @@ ; Manifest domain="domain.tld" path="/path" + admin="john" + language="fr" is_public=1 + password="pass" + port="666" ; Checks pkg_linter=1 - setup_sub_dir=0 + setup_sub_dir=1 setup_root=1 setup_nourl=0 setup_private=1 setup_public=1 upgrade=1 + #upgrade=1 from_commit=CommitHash backup_restore=1 multi_instance=0 change_url=1 ;;; Options Email= -Notification=none \ No newline at end of file +Notification=none +;;; Upgrade options + ; commit=CommitHash + name=Name and date of the commit. + manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& \ No newline at end of file From 5eaa582efef94c067227a1db6ff4c7f8d3c1e236 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 8 Jul 2021 11:35:35 +0200 Subject: [PATCH 4/8] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 93ad826..c358d02 100644 --- a/scripts/install +++ b/scripts/install @@ -57,7 +57,7 @@ ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_script_progression --message="Finding an available port..." --weight=0 # Find an available port -port=$(ynh_find_port --port=9999) +port=$(ynh_find_port --port=3000) ynh_app_setting_set --app=$app --key=port --value=$port #================================================= From e56772cdfc091954bf409791dfdab7d89e2eda9d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 8 Jul 2021 11:44:26 +0200 Subject: [PATCH 5/8] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index c358d02..93ad826 100644 --- a/scripts/install +++ b/scripts/install @@ -57,7 +57,7 @@ ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_script_progression --message="Finding an available port..." --weight=0 # Find an available port -port=$(ynh_find_port --port=3000) +port=$(ynh_find_port --port=9999) ynh_app_setting_set --app=$app --key=port --value=$port #================================================= From 6386a256b8ec0bb417a5d86b1f776fe3829db598 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 8 Jul 2021 11:46:15 +0200 Subject: [PATCH 6/8] Fix --- conf/nginx.conf | 2 +- conf/systemd.service | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 24edbcb..0831a50 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -5,7 +5,7 @@ location / { rewrite ^ https://$server_name$request_uri? permanent; } - proxy_pass http://127.0.0.1:__PORT__/; + proxy_pass http://127.0.0.1:__PORT__; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; diff --git a/conf/systemd.service b/conf/systemd.service index e769067..b254212 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ After=network-online.target Type=simple User=__APP__ Group=__APP__ -ExecStart=__FINALPATH__/dispatch +ExecStart=__FINALPATH__/dispatch -a 127.0.0.1 -p __PORT__ Restart=on-failure RestartSec=5 StartLimitInterval=60s From e6f1aca41d65efeeef6da34e5d5c370b338f1401 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 8 Jul 2021 11:53:42 +0200 Subject: [PATCH 7/8] fix --- conf/config.default.toml | 2 +- conf/nginx.conf | 13 ++++--------- conf/systemd.service | 2 +- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/conf/config.default.toml b/conf/config.default.toml index 0b30d7b..513a775 100644 --- a/conf/config.default.toml +++ b/conf/config.default.toml @@ -1,5 +1,5 @@ # IP address to listen on, leave empty to listen on anything -address = "127.0.0.1" +address = "" port = __PORT__ # Run ident daemon on port 113 identd = true diff --git a/conf/nginx.conf b/conf/nginx.conf index 0831a50..7b4d98f 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -5,16 +5,11 @@ location / { rewrite ^ https://$server_name$request_uri? permanent; } - proxy_pass http://127.0.0.1:__PORT__; - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Host $server_name; - + proxy_pass http://127.0.0.1:__PORT__/; proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header Host $host; } diff --git a/conf/systemd.service b/conf/systemd.service index b254212..2247ddd 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ After=network-online.target Type=simple User=__APP__ Group=__APP__ -ExecStart=__FINALPATH__/dispatch -a 127.0.0.1 -p __PORT__ +ExecStart=__FINALPATH__/dispatch -a 0.0.0.0 -p __PORT__ Restart=on-failure RestartSec=5 StartLimitInterval=60s From 62a07eb4f31b9d9aaa4e517f943b605068621b78 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 8 Jul 2021 12:03:57 +0200 Subject: [PATCH 8/8] fix --- conf/config.default.toml | 4 ++-- conf/systemd.service | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/config.default.toml b/conf/config.default.toml index 513a775..0f34137 100644 --- a/conf/config.default.toml +++ b/conf/config.default.toml @@ -83,10 +83,10 @@ delete_after = "30m" [proxy] # Dispatch will make all outgoing connections through the specified proxy when enabled -enabled = false +enabled = true protocol = "socks5" host = "127.0.0.1" -port = 1080 +port = __PORT__ username = "" password = "" diff --git a/conf/systemd.service b/conf/systemd.service index 2247ddd..b254212 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ After=network-online.target Type=simple User=__APP__ Group=__APP__ -ExecStart=__FINALPATH__/dispatch -a 0.0.0.0 -p __PORT__ +ExecStart=__FINALPATH__/dispatch -a 127.0.0.1 -p __PORT__ Restart=on-failure RestartSec=5 StartLimitInterval=60s