Last active
December 28, 2015 12:29
-
-
Save srounet/7501346 to your computer and use it in GitHub Desktop.
Delegated rc.d for FreeBSD 9.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
. /etc/rc.subr | |
name="delegated" | |
rcvar=delegated_enable | |
load_rc_config ${name} | |
: ${delegated_pidfile="/var/run/delegated/delegated.pid"} | |
max=15 | |
for i in `seq 1 $max` | |
do | |
pidfile=${delegated_pidfile}$i | |
command="/usr/local/sbin/${name}" | |
command_args="-P$((9150 + i)) SERVER=http SOCKS=localhost:$((9050 + 1)) PIDFILE=${pidfile} OWNER=root/wheel" | |
run_rc_command "$1" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment