diff --git a/check_process b/check_process index 2d042c8..ddb1834 100644 --- a/check_process +++ b/check_process @@ -2,10 +2,14 @@ ; 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 @@ -17,4 +21,8 @@ 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 diff --git a/conf/config.default.toml b/conf/config.default.toml index 0b30d7b..0f34137 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 @@ -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/nginx.conf b/conf/nginx.conf index 0119228..7b4d98f 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -5,15 +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 3e4b6ec..faef750 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,11 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__/ -ExecStart=__FINALPATH__/dispatch +ExecStart=__FINALPATH__/dispatch -a 127.0.0.1 -p __PORT__ +Restart=on-failure +RestartSec=5 +StartLimitInterval=60s +StartLimitBurst=3 # Sandboxing options to harden security # Depending on specificities of your service/app, you may need to tweak these diff --git a/scripts/install b/scripts/install index 982934a..93ad826 100644 --- a/scripts/install +++ b/scripts/install @@ -113,9 +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" - -#sleep 60 +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 816553c..a0a5425 100644 --- a/scripts/restore +++ b/scripts/restore @@ -88,7 +88,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