#!/bin/sh # PROVIDE: ssserver_rust # REQUIRE: NETWORKING SERVERS # # Add the following lines to /etc/rc.conf to run ssserver: # ssserver_rust_enable (bool): Set it to "YES" to enable ssserver. # Default is "NO". # ssserver_rust_args (string): Set it to the desired arguments to run ssserver. # Default is "-c %%ETCDIR%%/config.json". # . /etc/rc.subr name="ssserver_rust" rcvar=ssserver_rust_enable pidfile="/var/run/${name}.pid" logfile="/var/log/${name}.log" : ${ssserver_rust_enable="NO"} : ${ssserver_rust_args="-c %%ETCDIR%%/config.json"} procname=%%PREFIX%%/bin/ssserver command="/usr/sbin/daemon" command_args="-f -S \ -p ${pidfile} \ -o ${logfile} \ -t ${name}_ssserver \ %%PREFIX%%/bin/ssserver $ssserver_rust_args" load_rc_config $name run_rc_command "$1"