3proxy/scripts/rc.d/3proxy.in
Vladimir Dubrovin 28969bbc5a
Some checks are pending
C/C++ CI / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI / ${{ matrix.target }} (windows-2022) (push) Waiting to run
add rc.d script
2026-04-05 02:02:27 +03:00

28 lines
495 B
Bash

#!/bin/sh
# PROVIDE: 3proxy
# REQUIRE: LOGIN DAEMON
# KEYWORD: shutdown
. /etc/rc.subr
name="3proxy"
rcvar="3proxy_enable"
command="@CMAKE_INSTALL_FULL_BINDIR@/3proxy"
pidfile="/var/run/3proxy/${name}.pid"
command_args="${3proxy_config:-/etc/3proxy/3proxy.cfg}"
required_files="${3proxy_config:-/etc/3proxy/3proxy.cfg}"
start_precmd="3proxy_precmd"
3proxy_precmd()
{
if [ ! -d /var/run/3proxy ]; then
mkdir -p /var/run/3proxy
fi
}
load_rc_config $name
run_rc_command "$1"