Fix logic to allow not setting TORRC_PATH
This commit is contained in:
parent
24d11a1793
commit
10dcad721c
17
start
17
start
@ -4,11 +4,16 @@
|
||||
#
|
||||
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:-""}
|
||||
[[ "$TORRC_PATH" ]] && echo "$(date) [ $(basename $0) ] Using torrc file from '$TORRC_PATH'.."
|
||||
[[ -e "$TORRC_PATH" ]] || {
|
||||
echo "$(date) [ $(basename $0) ] FATAL: No such file '$TORRC_PATH'." >&1
|
||||
exit 1
|
||||
}
|
||||
cp -v "$TORRC_PATH" /usr/local/bin/Browser/TorBrowser/Data/Tor/torrc
|
||||
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
|
||||
|
||||
start-tor-browser "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user