Hi Layer13
Am 13.03.2020 um 09:51 schrieb Paul Geurts:
it would send me an automated email telling me that my relay is down
I apologize to not answer to what you ask for.
A little bit of backstory on why I need this: so a couple of days ago (13 to be exact) my server had an issue and rebooted, since that reboot I didn't start my relay node and it was down for 13 days until I noticed it today.
But let me propose some alternatives:
1) Make the tor instance start after a server reboot On super old Debian it worked for me like: # crontab -e @reboot tor -f /etc/tor/torrc >/dev/null 2>&1
On Freebsd it works like: echo tor_enable="YES" > /etc/rc.conf
2) Run a tor client (only) on any other pc, pi or server if you have one and grep its consensus file hourly for the fingerprint of your relay. The computer could send out emails etc. The consensus file is found in the tor client tor data directory: %DataDirectory%/cached-microdesc-consensus The tor client receives documents from the network hourly or so. If the network does not see your relay for a certain periode it gets kicked from the consensus list until it's back and running well enough. Btw the flags and the consensus value can be found there as well.
3) Edit the tor servers torrc file and include the directive: DirPortFrontPage /somewhere/mypage.html Write a simple html file and give tor the rights to read it: # nano /somewhere/mypage.html <html> <head> <title> TorServerNonExit </title> </head> <body> <p> my fingerprint </p> </body> </html> You need to have the DirPort active. If the DirPort is on a browser readable port (ie 80) you can browse, wget or curl the relay_address:port and see if the daemon runs.
Have fun with your relays and stay healthy!
-- Cheers, Felix