2020-10-05 14:34:27 +00:00
|
|
|
#!/bin/bash
|
2020-10-02 14:34:30 +00:00
|
|
|
|
|
|
|
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
|
2020-10-06 12:26:41 +00:00
|
|
|
mv torch-agent.py /usr/local/lib/torch/
|
|
|
|
chown root:root /usr/local/lib/torch/torch-agent.py
|
|
|
|
chmod 644 /usr/local/lib/torch/torch-agent.py
|
2020-10-02 14:34:30 +00:00
|
|
|
|
|
|
|
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
|