mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-20 13:02:21 +02:00
tor: reload instead of restart
This commit is contained in:
@@ -76,7 +76,7 @@ case $CHOICE in
|
||||
if [ $(grep -c "peerbloomfilters=1" < /mnt/hdd/bitcoin/bitcoin.conf) -gt 0 ]&&\
|
||||
[ $(grep -c Bisq < /etc/tor/torrc) -gt 0 ];then
|
||||
OPTIONS+=(SHOWBISQ "Show the Hidden Service to connect Bisq")
|
||||
OPTIONS+=(REMOVEBISQ "Remove the Hidden Service for bisq")
|
||||
OPTIONS+=(REMOVEBISQ "Remove the Hidden Service for Bisq")
|
||||
fi
|
||||
CHOICE=$(dialog --clear \
|
||||
--backtitle "" \
|
||||
@@ -103,12 +103,12 @@ case $CHOICE in
|
||||
if [ $(grep -c Bisq < /etc/tor/torrc) -eq 0 ];then
|
||||
echo "# Creating the Hidden Service for Bisq"
|
||||
echo "
|
||||
# Hidden Service for Bisq (bitcoin RPC v3)
|
||||
# Hidden Service for Bisq (bitcoin P2P v3)
|
||||
HiddenServiceDir /mnt/hdd/tor/bisq
|
||||
HiddenServiceVersion 3
|
||||
HiddenServicePort 8333 127.0.0.1:8333" | sudo tee -a /etc/tor/torrc
|
||||
echo "# Restarting Tor"
|
||||
sudo systemctl restart tor
|
||||
echo "# Reloading Tor"
|
||||
sudo systemctl reload tor@default
|
||||
sleep 10
|
||||
TOR_ADDRESS=$(sudo cat /mnt/hdd/tor/bisq/hostname)
|
||||
if [ -z "$TOR_ADDRESS" ]; then
|
||||
@@ -135,7 +135,7 @@ HiddenServicePort 8333 127.0.0.1:8333" | sudo tee -a /etc/tor/torrc
|
||||
REMOVEBISQ)
|
||||
sudo sed -i '/Bisq/{N;N;N;d}' /etc/tor/torrc
|
||||
echo "# Restarting Tor"
|
||||
sudo systemctl restart tor;;
|
||||
sudo systemctl reload tor@default;;
|
||||
SHOWBISQ)
|
||||
clear
|
||||
TOR_ADDRESS=$(sudo cat /mnt/hdd/tor/bisq/hostname)
|
||||
|
@@ -143,12 +143,12 @@ case $CHOICE in
|
||||
if /home/admin/config.scripts/blitz.setconf.sh "/etc/tor/torrc" "debian-tor"
|
||||
then
|
||||
whiptail \
|
||||
--title "Restart" --yes-button "Restart" --no-button "Not now" \
|
||||
--yesno "To apply the new settings Tor needs to restart.
|
||||
--title "Reload" --yes-button "Reload" --no-button "Not now" \
|
||||
--yesno "To apply the new settings need to reload Tor.
|
||||
Do you want to restart Tor now?" 10 55
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "# Restarting tor"
|
||||
sudo systemctl restart tor@default
|
||||
sudo systemctl reload tor@default
|
||||
else
|
||||
echo "# Continue without restarting."
|
||||
fi
|
||||
|
@@ -146,11 +146,11 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
sudo sed -i "s:^CookieAuthFile*:#CookieAuthFile:g" /etc/tor/torrc
|
||||
if ! grep -Eq "^CookieAuthentication 1" /etc/tor/torrc; then
|
||||
echo "CookieAuthentication 1" | sudo tee -a /etc/tor/torrc
|
||||
sudo systemctl restart tor@default
|
||||
sudo systemctl reload tor@default
|
||||
fi
|
||||
if ! grep -Eq "^AllowOutboundLocalhost 1" /etc/tor/torsocks.conf; then
|
||||
echo "AllowOutboundLocalhost 1" | sudo tee -a /etc/tor/torsocks.conf
|
||||
sudo systemctl restart tor@default
|
||||
sudo systemctl reload tor@default
|
||||
fi
|
||||
|
||||
# joinin.conf settings
|
||||
|
@@ -96,7 +96,7 @@ HiddenServicePort $toPort 127.0.0.1:$fromPort" | sudo tee -a /etc/tor/torrc
|
||||
fi
|
||||
fi
|
||||
|
||||
# restart tor
|
||||
# reload tor
|
||||
echo
|
||||
echo "Reloading Tor to activate the Hidden Service..."
|
||||
sudo chmod 644 /etc/tor/torrc
|
||||
|
Reference in New Issue
Block a user