22 lines
701 B
Bash
Executable File
22 lines
701 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Entrypoint script for tor-browser.
|
|
#
|
|
set -euo pipefail
|
|
|
|
# If TORRC_PATH is set in the environment, use the torrc file
|
|
# specified by that path instead of the default config.
|
|
TORRC_PATH=${TORRC_PATH:-""}
|
|
if [[ "$TORRC_PATH" ]]; then
|
|
echo "$(date) [ $(basename $0) ] Using torrc file from '$TORRC_PATH'.."
|
|
if [[ ! -e "$TORRC_PATH" ]]; then
|
|
echo "$(date) [ $(basename $0) ] FATAL: No such file '$TORRC_PATH'." >&1
|
|
exit 1
|
|
fi
|
|
cp -v "$TORRC_PATH" /usr/local/bin/Browser/TorBrowser/Data/Tor/torrc
|
|
fi
|
|
|
|
echo "$(date) [ $(basename $0) ] Starting tor-browser with extra args '$@'.."
|
|
start-tor-browser "$@" --debug
|
|
echo "$(date) [ $(basename $0) ] The tor-browser process exited."
|