mirror of
https://github.com/benbusby/whoogle-search
synced 2024-11-01 03:20:30 +00:00
96b9cce70c
Allows skipping the Tor startup script if WHOOGLE_TOR_SERVICE is set to 0. This is separate from WHOOGLE_CONFIG_TOR, which only allows enabling/disabling user configuration of passing searches through Tor. Closes #631
17 lines
298 B
Bash
Executable File
17 lines
298 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ "$WHOOGLE_TOR_SERVICE" == "0" ]; then
|
|
echo "Skipping Tor startup..."
|
|
exit 0
|
|
fi
|
|
|
|
if [ "$(whoami)" != "root" ]; then
|
|
tor -f /etc/tor/torrc
|
|
else
|
|
if (grep alpine /etc/os-release >/dev/null); then
|
|
rc-service tor start
|
|
else
|
|
service tor start
|
|
fi
|
|
fi
|