add tor env switch
This commit is contained in:
@ -6,6 +6,7 @@ RUN apt update && apt install -y tor curl
|
||||
|
||||
COPY hidden_service /hidden_service
|
||||
COPY torrc /etc/tor/torrc
|
||||
COPY entrypoint.sh /
|
||||
|
||||
RUN chown -R tor /etc/tor
|
||||
RUN chown -R tor /hidden_service
|
||||
@ -14,5 +15,5 @@ RUN chmod -R go-rwx /hidden_service
|
||||
|
||||
USER tor
|
||||
|
||||
ENTRYPOINT ["tor"]
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
|
8
tor/entrypoint.sh
Executable file
8
tor/entrypoint.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
if $USE_TOR ; then
|
||||
echo "@@@@@@@@@@ TOR ENABLED BY ENV"
|
||||
exec tor
|
||||
else
|
||||
echo "@@@@@@@@@@ TOR DISABLED BY ENV"
|
||||
fi
|
Reference in New Issue
Block a user