1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dispatch_ynh.git synced 2024-09-03 18:25:53 +02:00

Merge pull request #3 from YunoHost-Apps/patch

Patch
This commit is contained in:
Éric Gaspar 2021-09-08 13:43:17 +02:00 committed by GitHub
commit 2df22367d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 26 additions and 20 deletions

View file

@ -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
@ -18,3 +22,7 @@
;;; Options
Email=
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&

View file

@ -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 = ""

View file

@ -6,14 +6,10 @@ location / {
}
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_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;
}

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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