aboutsummaryrefslogtreecommitdiff
path: root/debian/tor.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/tor.postinst')
-rw-r--r--debian/tor.postinst8
1 files changed, 5 insertions, 3 deletions
diff --git a/debian/tor.postinst b/debian/tor.postinst
index 29d098429..b9ac61596 100644
--- a/debian/tor.postinst
+++ b/debian/tor.postinst
@@ -43,9 +43,11 @@ find /var/lib/tor \( \( ! -user debian-tor \) -o \( ! -group debian-tor \) \) -p
find /var/lib/tor -type d -print0 | xargs -0 --no-run-if-empty chmod 02700
find /var/lib/tor -type f -print0 | xargs -0 --no-run-if-empty chmod 00600
-find /var/run/tor \( \( ! -user debian-tor \) -o \( ! -group debian-tor \) \) -print0 | xargs -0 --no-run-if-empty chown debian-tor:debian-tor
-find /var/run/tor -type d -print0 | xargs -0 --no-run-if-empty chmod 02750
-find /var/run/tor -type f -print0 | xargs -0 --no-run-if-empty chmod 00600
+if [ -e /var/run/tor ]; then
+ find /var/run/tor \( \( ! -user debian-tor \) -o \( ! -group debian-tor \) \) -print0 | xargs -0 --no-run-if-empty chown debian-tor:debian-tor
+ find /var/run/tor -type d -print0 | xargs -0 --no-run-if-empty chmod 02750
+ find /var/run/tor -type f -print0 | xargs -0 --no-run-if-empty chmod 00600
+fi
find /var/log/tor \( \( ! -user debian-tor \) -o \( ! -group adm \) \) -print0 | xargs -0 --no-run-if-empty chown debian-tor:adm
find /var/log/tor -type d -print0 | xargs -0 --no-run-if-empty chmod 02750