aboutsummaryrefslogtreecommitdiff
path: root/debian/tor.init
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2006-01-23 15:04:03 +0000
committerPeter Palfrader <peter@palfrader.org>2006-01-23 15:04:03 +0000
commit5521b5de3ee5f505ae07e6e129e1d4a87a87d198 (patch)
tree5c044884cd6544c0920e6398d082a87c83ebbf98 /debian/tor.init
parent979c71632d2392edc96a1a91040179b6f8636ec9 (diff)
downloadtor-5521b5de3ee5f505ae07e6e129e1d4a87a87d198.tar
tor-5521b5de3ee5f505ae07e6e129e1d4a87a87d198.tar.gz
Print that we're raising the ulimit to stdout in the init script.
svn:r5853
Diffstat (limited to 'debian/tor.init')
-rw-r--r--debian/tor.init11
1 files changed, 9 insertions, 2 deletions
diff --git a/debian/tor.init b/debian/tor.init
index d764fb942..e930b496f 100644
--- a/debian/tor.init
+++ b/debian/tor.init
@@ -25,7 +25,7 @@ TORPID=$TORPIDDIR/tor.pid
DEFAULTSFILE=/etc/default/$NAME
WAITFORDAEMON=60
ARGS=""
-MAX_FILEDESCRIPTORS=4096
+MAX_FILEDESCRIPTORS=8192
NICE=""
test -x $DAEMON || exit 0
@@ -72,8 +72,15 @@ case "$1" in
fi
if test ! -x $TORPIDDIR; then echo "Cannot access $TORPIDDIR directory, are you root?" >&2; exit 1;
else
+ if [ -n "$MAX_FILEDESCRIPTORS" ]; then
+ echo -n "Raising maximum number of filedescriptors (ulimit -n) to $MAX_FILEDESCRIPTORS"
+ if ulimit -n "$MAX_FILEDESCRIPTORS" ; then
+ echo "."
+ else
+ echo ": FAILED."
+ fi
+ fi
echo "Starting $DESC: $NAME..."
- ulimit -n $MAX_FILEDESCRIPTORS || echo "Warn: Could not set ulimit for number of file descriptors." >&2
start-stop-daemon --start --quiet --oknodo \
--chuid debian-tor:debian-tor \
--pidfile $TORPID \