summaryrefslogtreecommitdiff
path: root/roles/hysteria/templates/hysteria.rc.j2
diff options
context:
space:
mode:
authorrepliqa <sarzilhossain@proton.me>2025-07-23 14:06:15 +0600
committerrepliqa <sarzilhossain@proton.me>2025-07-23 14:06:15 +0600
commit69acb7a82a68eeb439e55b994281056df52c81b1 (patch)
tree7c6a53694e11511a3014470c213255a503f9c95e /roles/hysteria/templates/hysteria.rc.j2
v0.0.1alphaHEADmain
Diffstat (limited to 'roles/hysteria/templates/hysteria.rc.j2')
-rw-r--r--roles/hysteria/templates/hysteria.rc.j222
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