This repository has been archived on 2021-05-15. You can view files and clone it, but cannot push or open issues or pull requests.
tor-reverseproxy/entrypoint.sh
Simon Bruder 585b470624
All checks were successful
continuous-integration/drone/push Build is passing
init
2019-05-27 14:25:44 +00:00

15 lines
314 B
Bash
Executable file

#!/bin/sh
su-exec tor tor -f /etc/tor/torrc
tor_domain=$(cat /var/lib/tor/hidden-service/hostname)
main_domain=$(echo $MAIN_DOMAIN|sed 's/\./\\\./')
sed -i \
-e "s/@@TOR_DOMAIN@@/$tor_domain/g" \
-e "s/@@MAIN_DOMAIN@@/$main_domain/g" \
/etc/nginx/nginx.conf
echo $tor_domain
nginx -g 'daemon off;'