From 979c71632d2392edc96a1a91040179b6f8636ec9 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Mon, 23 Jan 2006 14:02:03 +0000 Subject: * Create /var/run/tor on init script start if it does not exist already. * Set default ulimit -n to 8k instead of 4k in /etc/default/tor. svn:r5852 --- debian/changelog | 7 +++++-- debian/tor.default | 2 +- debian/tor.init | 8 ++++++-- 3 files changed, 12 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 7432119d8..1e75935f1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,13 @@ -tor (0.1.1.12-alpha-2XXXXXX) unreleased; urgency=low +tor (0.1.1.12-alpha-cvs-0) unreleased; urgency=low * CVS SNAPSHOT * Forward port patches/02_add_debian_files_in_manpage. * Forward port patches/03_tor_manpage_in_section_8. + * Create /var/run/tor on init script start if it does + not exist already. + * Set default ulimit -n to 8k instead of 4k in /etc/default/tor. - -- Peter Palfrader Thu, 12 Jan 2006 03:18:59 +0100 + -- Peter Palfrader Mon, 23 Jan 2006 15:00:53 +0100 tor (0.1.1.12-alpha-1) experimental; urgency=low diff --git a/debian/tor.default b/debian/tor.default index 289f054f0..237e5bc52 100644 --- a/debian/tor.default +++ b/debian/tor.default @@ -12,7 +12,7 @@ RUN_DAEMON="yes" # if they are very busy and have many clients connected to them. # (ulimit -n) # -MAX_FILEDESCRIPTORS=4096 +MAX_FILEDESCRIPTORS=8192 # # If tor is seriously hogging your CPU, taking away too much cycles from diff --git a/debian/tor.init b/debian/tor.init index e0e4709f2..d764fb942 100644 --- a/debian/tor.init +++ b/debian/tor.init @@ -65,8 +65,12 @@ case "$1" in if [ "$RUN_DAEMON" != "yes" ]; then echo "Not starting $DESC (Disabled in $DEFAULTSFILE)." else - if test ! -d $TORPIDDIR; then echo "There is no $TORPIDDIR directory." >&2; exit 1 - elif test ! -x $TORPIDDIR; then echo "Cannot access $TORPIDDIR directory, are you root?" >&2; exit 1; + if test ! -d $TORPIDDIR; then + echo "There is no $TORPIDDIR directory. Creating one for you." + mkdir -m 02700 "$TORPIDDIR" + chown debian-tor:debian-tor "$TORPIDDIR" + fi + if test ! -x $TORPIDDIR; then echo "Cannot access $TORPIDDIR directory, are you root?" >&2; exit 1; else echo "Starting $DESC: $NAME..." ulimit -n $MAX_FILEDESCRIPTORS || echo "Warn: Could not set ulimit for number of file descriptors." >&2 -- cgit v1.2.3