2020-10-02 14:34:30 +00:00
|
|
|
#!/usr/bin/bash
|
|
|
|
|
|
|
|
apt update
|
|
|
|
apt install -y tor python3-pip
|
2020-10-05 11:18:22 +00:00
|
|
|
sudo -H pip3 install stem paho-mqtt PySocks
|
2020-10-02 14:34:30 +00:00
|
|
|
|
|
|
|
sed -i '/^#ControlPort 9051/s/^#//' /etc/tor/torrc
|
|
|
|
sed -i '/^#CookieAuthentication 1/s/^#//' /etc/tor/torrc
|
|
|
|
echo "CookieAuthFileGroupReadable 1" >> /etc/tor/torrc
|
|
|
|
systemctl reload tor
|
|
|
|
|
|
|
|
useradd --system -g debian-tor torch
|
|
|
|
|
|
|
|
mkdir -p /etc/torch
|
|
|
|
cp torch.conf /etc/torch/
|
|
|
|
chown -R torch /etc/torch
|
|
|
|
|
|
|
|
mkdir -p /usr/local/lib/torch
|
|
|
|
mv torch-pub.py /usr/local/lib/torch/
|
|
|
|
chown root:root /usr/local/lib/torch/torch-pub.py
|
|
|
|
chmod 644 /usr/local/lib/torch/torch-pub.py
|
|
|
|
|
|
|
|
mv torch.service /etc/systemd/system/
|
|
|
|
chown root:root /etc/systemd/system/torch.service
|
|
|
|
chmod 644 /etc/systemd/system/torch.service
|
|
|
|
|
|
|
|
systemctl daemon-reload
|
|
|
|
systemctl enable torch
|