[tor-relays] Wrote a small "script" for automatic family synchronisation
charles at torrelays.ru
charles at torrelays.ru
Tue May 25 16:35:43 UTC 2021
Hey y'all. I made a small script to automate the Family setup of relays
and wanted to get your opinion on it.
step 1) create a file called sync_Fam.sh in the /home/ directory. (or
wherever you feel like creating it)
the file should contain this:
sed -i '/MyFamily/d' /etc/tor/torrc
cat "FamilyList.txt" >> /etc/tor/torrc
What this will do is remove the line with "MyFamily" in the torrc file,
and add the contents of a file called "FamilyList.txt" to the torrc
file. FamilyList.txt will, ofcourse, contain the line MyFamily
$fingerprint1, $fingerprint2, $fingerprint 3,....
step 2) create a webserver where you display the list of fingerprints to
add
I used nginx for this, use whatever you feel like using. as long as it
works :p
step 3)
search for the location of the .pid file of tor. if you want to use a
custom location you can do it by adding the line "PidFile
{locationofwhereyouwanttoplaceit}" i decided to also place it in the
home directory.
step 4) add a crontab (you can use crontab -e)
45 * * * * cd /home/ && wget -N http://{IPofTheWebServer}/FamilyList.txt
46 * * * * cd /home/ && ./sync_Fam.sh
47 * * * * kill -HUP $(cat /home/tor.pid)
what this will do, is download the FamilyList.txt file from the
webserver, run sync_Fam.sh, and reload tor. (-HUP sends a reload signal)
so.. what do y'all think of it? is it a good script?
More information about the tor-relays
mailing list