mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-04 12:05:04 +02:00
Joinmarket Tor fix JoininBox to v0.1.10 (#1666)
* joinmarket: update to v0.7.1 * joininbox: update to v0.1.10
This commit is contained in:
@@ -125,27 +125,33 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||||||
sudo -u joinmarket git clone https://github.com/openoms/joininbox.git /home/joinmarket/joininbox
|
sudo -u joinmarket git clone https://github.com/openoms/joininbox.git /home/joinmarket/joininbox
|
||||||
# check the latest at:
|
# check the latest at:
|
||||||
# https://github.com/openoms/joininbox/releases/
|
# https://github.com/openoms/joininbox/releases/
|
||||||
sudo -u joinmarket git reset --hard v0.1.9
|
sudo -u joinmarket git reset --hard v0.1.10
|
||||||
sudo -u joinmarket cp /home/joinmarket/joininbox/scripts/* /home/joinmarket/
|
sudo -u joinmarket cp /home/joinmarket/joininbox/scripts/* /home/joinmarket/
|
||||||
sudo -u joinmarket cp /home/joinmarket/joininbox/scripts/.* /home/joinmarket/ 2>/dev/null
|
sudo -u joinmarket cp /home/joinmarket/joininbox/scripts/.* /home/joinmarket/ 2>/dev/null
|
||||||
sudo chmod +x /home/joinmarket/*.sh
|
sudo chmod +x /home/joinmarket/*.sh
|
||||||
|
|
||||||
# joinin.conf settings
|
# Tor config
|
||||||
sudo -u joinmarket touch /home/joinmarket/joinin.conf
|
# add the joinmarket user to the Tor group
|
||||||
# tor config
|
usermod -a -G debian-tor joinmarket
|
||||||
# add default value to joinin.conf if needed
|
# fix Tor config
|
||||||
checkTorEntry=$(sudo -u joinmarket cat /home/joinmarket/joinin.conf | grep -c "runBehindTor")
|
sudo sed -i "s:^CookieAuthFile*:#CookieAuthFile:g" /etc/tor/torrc
|
||||||
if [ ${checkTorEntry} -eq 0 ]; then
|
if ! grep -Eq "^CookieAuthentication 1" /etc/tor/torrc; then
|
||||||
echo "runBehindTor=off" | sudo -u joinmarket tee -a /home/joinmarket/joinin.conf
|
echo "CookieAuthentication 1" | sudo tee -a /etc/tor/torrc
|
||||||
|
sudo systemctl restart tor
|
||||||
fi
|
fi
|
||||||
checkAllowOutboundLocalhost=$(sudo cat /etc/tor/torsocks.conf | grep -c "AllowOutboundLocalhost 1")
|
if ! grep -Eq "^AllowOutboundLocalhost 1" /etc/tor/torsocks.conf; then
|
||||||
if [ ${checkAllowOutboundLocalhost} -eq 0 ]; then
|
|
||||||
echo "AllowOutboundLocalhost 1" | sudo tee -a /etc/tor/torsocks.conf
|
echo "AllowOutboundLocalhost 1" | sudo tee -a /etc/tor/torsocks.conf
|
||||||
sudo systemctl restart tor
|
sudo systemctl restart tor
|
||||||
fi
|
fi
|
||||||
# setting value in joinin config
|
|
||||||
checkBlitzTorEntry=$(cat /mnt/hdd/raspiblitz.conf | grep -c "runBehindTor=on")
|
# joinin.conf settings
|
||||||
if [ ${checkBlitzTorEntry} -gt 0 ]; then
|
sudo -u joinmarket touch /home/joinmarket/joinin.conf
|
||||||
|
# add default Tor value to joinin.conf if needed
|
||||||
|
if ! grep -Eq "^runBehindTor" /home/joinmarket/joinin.conf; then
|
||||||
|
echo "runBehindTor=off" | sudo -u joinmarket tee -a /home/joinmarket/joinin.conf
|
||||||
|
fi
|
||||||
|
# setting Tor value in joinin config
|
||||||
|
if grep -Eq "^runBehindTor=on" /mnt/hdd/raspiblitz.conf; then
|
||||||
sudo -u joinmarket sed -i "s/^runBehindTor=.*/runBehindTor=on/g" /home/joinmarket/joinin.conf
|
sudo -u joinmarket sed -i "s/^runBehindTor=.*/runBehindTor=on/g" /home/joinmarket/joinin.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user