aboutsummaryrefslogtreecommitdiff
path: root/debian/tor.init
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2006-01-23 14:02:03 +0000
committerPeter Palfrader <peter@palfrader.org>2006-01-23 14:02:03 +0000
commit979c71632d2392edc96a1a91040179b6f8636ec9 (patch)
tree9c3513723e4d8732c7cd2635bf8aa3031ed27067 /debian/tor.init
parent1756ebdd4ef3e38fc12ff3d404ea9ba8ccb234b5 (diff)
downloadtor-979c71632d2392edc96a1a91040179b6f8636ec9.tar
tor-979c71632d2392edc96a1a91040179b6f8636ec9.tar.gz
* 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
Diffstat (limited to 'debian/tor.init')
-rw-r--r--debian/tor.init8
1 files changed, 6 insertions, 2 deletions
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