mirror of
https://github.com/YunoHost-Apps/dispatch_ynh.git
synced 2024-09-03 18:25:53 +02:00
commit
2df22367d7
7 changed files with 26 additions and 20 deletions
|
@ -2,10 +2,14 @@
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld"
|
domain="domain.tld"
|
||||||
path="/path"
|
path="/path"
|
||||||
|
admin="john"
|
||||||
|
language="fr"
|
||||||
is_public=1
|
is_public=1
|
||||||
|
password="pass"
|
||||||
|
port="666"
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
setup_sub_dir=0
|
setup_sub_dir=1
|
||||||
setup_root=1
|
setup_root=1
|
||||||
setup_nourl=0
|
setup_nourl=0
|
||||||
setup_private=1
|
setup_private=1
|
||||||
|
@ -17,4 +21,8 @@
|
||||||
change_url=1
|
change_url=1
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=
|
Email=
|
||||||
Notification=none
|
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&
|
|
@ -1,5 +1,5 @@
|
||||||
# IP address to listen on, leave empty to listen on anything
|
# IP address to listen on, leave empty to listen on anything
|
||||||
address = "127.0.0.1"
|
address = ""
|
||||||
port = __PORT__
|
port = __PORT__
|
||||||
# Run ident daemon on port 113
|
# Run ident daemon on port 113
|
||||||
identd = true
|
identd = true
|
||||||
|
@ -83,10 +83,10 @@ delete_after = "30m"
|
||||||
|
|
||||||
[proxy]
|
[proxy]
|
||||||
# Dispatch will make all outgoing connections through the specified proxy when enabled
|
# Dispatch will make all outgoing connections through the specified proxy when enabled
|
||||||
enabled = false
|
enabled = true
|
||||||
protocol = "socks5"
|
protocol = "socks5"
|
||||||
host = "127.0.0.1"
|
host = "127.0.0.1"
|
||||||
port = 1080
|
port = __PORT__
|
||||||
username = ""
|
username = ""
|
||||||
password = ""
|
password = ""
|
||||||
|
|
||||||
|
|
|
@ -5,15 +5,11 @@ location / {
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
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;
|
|
||||||
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_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,11 @@ Type=simple
|
||||||
User=__APP__
|
User=__APP__
|
||||||
Group=__APP__
|
Group=__APP__
|
||||||
WorkingDirectory=__FINALPATH__/
|
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
|
# Sandboxing options to harden security
|
||||||
# Depending on specificities of your service/app, you may need to tweak these
|
# Depending on specificities of your service/app, you may need to tweak these
|
||||||
|
|
|
@ -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
|
ynh_script_progression --message="Starting a systemd service..." --weight=2
|
||||||
|
|
||||||
# Start a systemd service
|
# 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"
|
||||||
|
|
||||||
#sleep 60
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
|
|
|
@ -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_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
|
# GENERIC FINALIZATION
|
||||||
|
|
|
@ -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_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
|
# RELOAD NGINX
|
||||||
|
|
Loading…
Reference in a new issue