You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
docker-tor-hidden-service/assets/docker-entrypoint.sh

23 lines
344 B
Bash

#!/bin/bash
set -e
if [ "${1:0:1}" == '-' ]; then
set -- tor $@
fi
if [ "$1" == "tor" ]; then
# Set config
python3 ./tor_config.py
# set rights on keys
chown -R debian-tor:debian-tor /var/lib/tor/hidden_service/
chmod -R 700 /var/lib/tor/hidden_service/
# Switch user
set -- su debian-tor -s /bin/sh -c "$@"
fi
exec "$@"