summaryrefslogtreecommitdiff
path: root/repo/tor
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-06-15 20:02:02 +0100
committerdavidovski <david@davidovski.xyz>2022-06-15 20:02:02 +0100
commitd2567bfbdf0e9fa6db0a6ed1534831ec859a3e03 (patch)
tree684a17eebf446aa1adab1097616f1882c8d51568 /repo/tor
parentd1fc3393cca72e8e432f827f7624e38734fad6dc (diff)
added deps for qemu
Diffstat (limited to 'repo/tor')
-rw-r--r--repo/tor/tor.post-upgrade21
-rw-r--r--repo/tor/tor.pre-install5
-rw-r--r--repo/tor/tor.xibuild5
3 files changed, 5 insertions, 26 deletions
diff --git a/repo/tor/tor.post-upgrade b/repo/tor/tor.post-upgrade
deleted file mode 100644
index ff00aab..0000000
--- a/repo/tor/tor.post-upgrade
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/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
diff --git a/repo/tor/tor.pre-install b/repo/tor/tor.pre-install
deleted file mode 100644
index cdeb7b4..0000000
--- a/repo/tor/tor.pre-install
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-adduser -S -D -H -h /var/lib/tor -s /sbin/nologin -g tor tor 2>/dev/null
-
-exit 0
diff --git a/repo/tor/tor.xibuild b/repo/tor/tor.xibuild
index 940da31..86c0eb1 100644
--- a/repo/tor/tor.xibuild
+++ b/repo/tor/tor.xibuild
@@ -44,3 +44,8 @@ package() {
"$PKG_DEST"/etc/conf.d/"tor"
}
+
+postinstall () {
+ useradd -r -m -U -d /var/lib/tor -s /sbin/nologin -g tor tor
+ return 0
+}