diff options
author | Renato Botelho <renato@netgate.com> | 2015-11-19 07:10:33 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-11-19 07:10:33 -0200 |
commit | e0547ab961736c52a6e759966a779cb6a772de6e (patch) | |
tree | 97108aaf1e9a2022ad17ed06a7823649f9da8ea5 /config/dansguardian/dansguardian_rc.template | |
parent | b364eb7b580512ff4ae89c383c3af838bc5d32a1 (diff) | |
parent | e587030cc36611931c86d213ecf49036d5f60f69 (diff) | |
download | pfsense-packages-e0547ab961736c52a6e759966a779cb6a772de6e.tar.gz pfsense-packages-e0547ab961736c52a6e759966a779cb6a772de6e.tar.bz2 pfsense-packages-e0547ab961736c52a6e759966a779cb6a772de6e.zip |
Merge pull request #1184 from doktornotor/patch-8
Diffstat (limited to 'config/dansguardian/dansguardian_rc.template')
-rwxr-xr-x | config/dansguardian/dansguardian_rc.template | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/config/dansguardian/dansguardian_rc.template b/config/dansguardian/dansguardian_rc.template index 580fb835..1d63c7ec 100755 --- a/config/dansguardian/dansguardian_rc.template +++ b/config/dansguardian/dansguardian_rc.template @@ -14,11 +14,6 @@ # # dansguardian_enable="YES" # dansguardian_flags="<set as needed>" -sysctl kern.ipc.somaxconn=16384 -sysctl kern.maxfiles=131072 -sysctl kern.maxfilesperproc=104856 -sysctl kern.threads.max_threads_per_proc=4096 - dansguardian_enable=${dansguardian_enable:-"YES"} dansguardian_pidfile=${dansguardian_pidfile:-"/var/run/dansguardian.pid"} @@ -27,6 +22,22 @@ dansguardian_pidfile=${dansguardian_pidfile:-"/var/run/dansguardian.pid"} name="dansguardian" rcvar=dansguardian_enable command="/usr/local/sbin/${name}" +start_precmd="${name}_prestart" + +dansguardian_prestart() +{ + /sbin/sysctl kern.ipc.somaxconn=16384 + /sbin/sysctl kern.maxfiles=131072 + /sbin/sysctl kern.maxfilesperproc=104856 + /sbin/sysctl kern.threads.max_threads_per_proc=4096 + + for i in dguardianipc dguardianipipc dguardianurlipc; do + if [ -f "/tmp/.${i}" ]; then + /bin/rm -f "/tmp/.${i}" + fi + done + return 0 +} load_rc_config $name |