aboutsummaryrefslogtreecommitdiff
path: root/debian/tor.init
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2008-02-20 22:34:44 +0000
committerPeter Palfrader <peter@palfrader.org>2008-02-20 22:34:44 +0000
commitc92c5733d6384f20bcf96049a56d7b86f8f7e7a9 (patch)
tree96cbdcdf387721db0e535584e1cf83739db96bd7 /debian/tor.init
parent93aa3355161923d722d196ebb27f35c8138c4c69 (diff)
downloadtor-c92c5733d6384f20bcf96049a56d7b86f8f7e7a9.tar
tor-c92c5733d6384f20bcf96049a56d7b86f8f7e7a9.tar.gz
if you have more than 40k FDs on your system let Tor use up to 16k of them by default
svn:r13627
Diffstat (limited to 'debian/tor.init')
-rw-r--r--debian/tor.init4
1 files changed, 3 insertions, 1 deletions
diff --git a/debian/tor.init b/debian/tor.init
index 415467e87..afb7f7eec 100644
--- a/debian/tor.init
+++ b/debian/tor.init
@@ -28,8 +28,10 @@ ARGS=""
# Let's try to figure our some sane defaults:
if [ -r /proc/sys/fs/file-max ]; then
system_max=`cat /proc/sys/fs/file-max`
- if [ "$system_max" -gt "100000" ] ; then
+ if [ "$system_max" -gt "80000" ] ; then
MAX_FILEDESCRIPTORS=32768
+ elif [ "$system_max" -gt "40000" ] ; then
+ MAX_FILEDESCRIPTORS=16384
elif [ "$system_max" -gt "20000" ] ; then
MAX_FILEDESCRIPTORS=8192
else