mirror of
https://github.com/openoms/joininbox.git
synced 2026-08-16 13:00:51 +02:00
build: Tor config fixes
This commit is contained in:
parent
9a1677c71a
commit
db595b0d06
1 changed files with 16 additions and 7 deletions
|
|
@ -361,15 +361,24 @@ fi
|
|||
echo "# install torsocks and nyx"
|
||||
apt install -y torsocks tor-arm
|
||||
|
||||
# Tor config
|
||||
# torrc
|
||||
if ! grep -Eq "^DataDirectory" /etc/tor/torrc; then
|
||||
echo "
|
||||
DataDirectory /var/lib/tor
|
||||
ControlPort 9051
|
||||
CookieAuthentication 1" | sudo tee -a /etc/tor/torrc
|
||||
echo "DataDirectory /var/lib/tor" | sudo tee -a /etc/tor/torrc
|
||||
fi
|
||||
echo "
|
||||
AllowOutboundLocalhost 1" | sudo tee -a /etc/tor/torsocks.conf
|
||||
|
||||
if ! grep -Eq "^ControlPort 9051" /etc/tor/torrc; then
|
||||
echo "ControlPort 9051" | sudo tee -a /etc/tor/torrc
|
||||
fi
|
||||
if ! grep -Eq "^CookieAuthentication 1" /etc/tor/torrc; then
|
||||
echo "CookieAuthentication 1" | sudo tee -a /etc/tor/torrc
|
||||
fi
|
||||
sudo sed -i "s:^CookieAuthFile*:#CookieAuthFile:g" /etc/tor/torrc
|
||||
# torsocks.conf
|
||||
if ! grep -Eq "^AllowOutboundLocalhost 1" /etc/tor/torsocks.conf; then
|
||||
echo "AllowOutboundLocalhost 1" | sudo tee -a /etc/tor/torsocks.conf
|
||||
fi
|
||||
# add the joinmarket user to the tor group
|
||||
usermod -a -G debian-tor joinmarket
|
||||
# setting value in joinin config
|
||||
sed -i "s/^runBehindTor=.*/runBehindTor=on/g" /home/joinmarket/joinin.conf
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue