dockerfiles/tor/entrypoint.sh

15 lines
242 B
Bash
Raw Normal View History

2020-04-08 13:05:07 +02:00
#!/bin/sh
set -xe
[ -n "${USER_ID}" ] && usermod -u "${USER_ID}" tor
for dir in $(awk '{if ($1 == "HiddenServiceDir") print $2}' /etc/tor/torrc)
do
mkdir -p "${dir}"
chown tor "${dir}"
chmod 700 "${dir}"
done
su-exec tor "$@"