mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-03-30 12:36:07 +02:00
parent
10a36361ed
commit
a6a5319032
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
pinnedVersion="v0.9.3"
|
||||
pinnedVersion="v0.10.0"
|
||||
|
||||
# command info
|
||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||
|
@ -24,11 +24,16 @@ if [ "$1" == "off" ]; then
|
||||
|
||||
# remove service paragraph
|
||||
sudo sed -i "/# Hidden Service for ${service}/,/^\s*$/{d}" /etc/tor/torrc
|
||||
|
||||
# remove double empty lines
|
||||
sudo awk 'NF > 0 {blank=0} NF == 0 {blank++} blank < 2' /etc/tor/torrc > /mnt/hdd/temp/tmp && sudo mv /mnt/hdd/temp/tmp /etc/tor/torrc
|
||||
sudo cp /etc/tor/torrc /mnt/hdd/temp/tmp
|
||||
sudo chmod 777 /mnt/hdd/temp/tmp
|
||||
sudo awk 'NF > 0 {blank=0} NF == 0 {blank++} blank < 2' /etc/tor/torrc > /mnt/hdd/temp/tmp
|
||||
sudo mv /mnt/hdd/temp/tmp /etc/tor/torrc
|
||||
sudo chmod 644 /etc/tor/torrc
|
||||
sudo chown bitcoin:bitcoin /etc/tor/torrc
|
||||
|
||||
echo "# OK service is removed - restarting TOR ..."
|
||||
sudo chmod 644 /etc/tor/torrc
|
||||
sudo systemctl restart tor
|
||||
sleep 10
|
||||
echo "# Done"
|
||||
|
Loading…
x
Reference in New Issue
Block a user