|
@@ -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 \
|