-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.sh
20 lines (16 loc) · 812 Bytes
/
start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
# generated a hashed password for the tor control port if a variable is set
if [ -z "$control_password" ]
then
echo "*********************************************************************************************"
echo "control_password variable not set, please set it during runtime to secure your tor control port"
echo "using default password 'my_password'"
echo "*********************************************************************************************"
echo ""
echo ""
else
password = $(tor --hash-password test |tail -1)
sed -i "s/HashedControlPassword .*/HashedControlPassword $password"/g /home/tor_runner/torrc
fi
echo "******************************** starting tor *******************************************"
/usr/bin/tor -f /home/tor_runner/torrc