diff options
| author | repliqa <sarzilhossain@proton.me> | 2025-07-23 14:06:15 +0600 |
|---|---|---|
| committer | repliqa <sarzilhossain@proton.me> | 2025-07-23 14:06:15 +0600 |
| commit | 69acb7a82a68eeb439e55b994281056df52c81b1 (patch) | |
| tree | 7c6a53694e11511a3014470c213255a503f9c95e /roles/hysteria/templates/hysteria.rc.j2 | |
Diffstat (limited to 'roles/hysteria/templates/hysteria.rc.j2')
| -rw-r--r-- | roles/hysteria/templates/hysteria.rc.j2 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/roles/hysteria/templates/hysteria.rc.j2 b/roles/hysteria/templates/hysteria.rc.j2 new file mode 100644 index 00000000..c0aeed29 --- /dev/null +++ b/roles/hysteria/templates/hysteria.rc.j2 @@ -0,0 +1,22 @@ +#!/bin/ksh +# +# $OpenBSD: hysteria + +chroot_dir=/var/reactance/hysteria +chroot_user=_vpn +daemon_class=daemon +daemon=/bin/hysteria +daemon_flags="server -c /etc/config.json" +daemon_user=root +daemon_logger=daemon.info + +. /etc/rc.d/rc.subr + +rc_start() { + rc_exec "chroot -u $chroot_user $chroot_dir $daemon $daemon_flags" +} + +rc_bg=YES +rc_reload=NO + +rc_cmd $1 |
