aboutsummaryrefslogtreecommitdiffstats
path: root/community/tor/tor.post-upgrade
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-08-31 15:52:12 +0200
committerJakub Jirutka <jakub@jirutka.cz>2016-08-31 15:54:35 +0200
commite76de920d4538eeaed3c6d914e1f6016ee30e208 (patch)
tree1a43aa2a29762a9a5688bc26f92662c141b89044 /community/tor/tor.post-upgrade
parent06d0775371a659d4fc202c06e5d1b9ff1a14f1a2 (diff)
downloadaports-e76de920d4538eeaed3c6d914e1f6016ee30e208.tar.gz
aports-e76de920d4538eeaed3c6d914e1f6016ee30e208.tar.bz2
aports-e76de920d4538eeaed3c6d914e1f6016ee30e208.tar.xz
community/tor: fix runscript - issues with User and DataDirectory options
Diffstat (limited to 'community/tor/tor.post-upgrade')
-rw-r--r--community/tor/tor.post-upgrade21
1 files changed, 21 insertions, 0 deletions
diff --git a/community/tor/tor.post-upgrade b/community/tor/tor.post-upgrade
new file mode 100644
index 0000000000..ff00aab782
--- /dev/null
+++ b/community/tor/tor.post-upgrade
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+ver_new="$1"
+ver_old="$2"
+
+if [ "$(apk version -t "$ver_old" "0.2.8.7-r0")" = "<" ]; then
+ cat 1>&2 <<-EOF
+ *
+ * Tor runscript has been updated to start tor under unprivileged user "tor"
+ * by default. If it fails to start due to permissions error, then change owner
+ * of files in the DataDirectory (default is /var/lib/tor) to the tor user:
+ * chown -R tor /var/lib/tor
+ *
+ * If you need tor to bind a privileged port (e.g. 80), then add "User tor"
+ * to /etc/tor/torrc. Tor will be started under root, but then setuid to the
+ * tor user and drop privileges.
+ *
+ EOF
+fi
+
+exit 0