summaryrefslogtreecommitdiff
path: root/roles/xray/templates/xray.rc.j2
blob: fe658fbc964ae6096928a7d850bc505e193d05b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/ksh
#
# $OpenBSD: xray

chroot_dir=/var/reactance/xray
chroot_user=_vpn
daemon_class=daemon
daemon=/bin/xray
daemon_flags="run -c /etc/config.json"
daemon_user=root

. /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