#!/sbin/openrc-run command="/usr/local/x-ui/x-ui" command_background=true pidfile="/run/x-ui.pid" description="x-ui Service" procname="x-ui" depend() { need net } start_pre(){ if [ "${XUI_ENABLE_FAIL2BAN+x}" ]; then export XUI_ENABLE_FAIL2BAN fi cd /usr/local/x-ui } reload() { ebegin "Reloading ${RC_SVCNAME}" kill -USR1 $(cat $pidfile) eend $? }