diff options
author | doktornotor <notordoktor@gmail.com> | 2015-11-18 21:25:37 +0100 |
---|---|---|
committer | doktornotor <notordoktor@gmail.com> | 2015-11-18 21:25:37 +0100 |
commit | 8678aa1a3ff0e9b040e2d732a64d96cb1bfeeb6a (patch) | |
tree | b5953cff8ce99c8d06151de6b8d8f00766d00b36 | |
parent | ead8f184163699bac2cece2113fb2469e0ed5b85 (diff) | |
download | pfsense-packages-8678aa1a3ff0e9b040e2d732a64d96cb1bfeeb6a.tar.gz pfsense-packages-8678aa1a3ff0e9b040e2d732a64d96cb1bfeeb6a.tar.bz2 pfsense-packages-8678aa1a3ff0e9b040e2d732a64d96cb1bfeeb6a.zip |
Fix service (re)restart failure due to some lingering /tmp junk
Reported @ https://forum.pfsense.org/index.php?topic=75321.0
-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 |