Ënnstatus provides the user with vital information about the status of the organizations Tor servers.
If you want to install the ennstatus app on your server, to list your own provided Tor server, follow these steps:
- Python 2.7
- A webserver with cgi feature (apache, thttpd, lighthttp)
- Clone this repo into your homefolder
hg clone https://bitbucket.org/fvde/ennstatus
- Install it via pip
cd ennstatus sudo pip install ./
Be sure that you have installed the package geoip-database from your distribution's repository.
# Debian/Ubuntu apt-get install geoip-database # Archlinux pacman -S geoip-database
- Configure your webserver
This step changes from webserver to webserver. If you want to use cgi, copy ennstatus.cgi to your cgi-bin folder and create in your cgi-folder a folder named data. Also you have to make the ennstatus.cgi file executable.
cp ennstatus.cgi YOUR_CGI_FOLDER cd YOUR_CGI_FOLDER mkdir data chmod +x ennstatus.cgi
If you want to use fcgi or wsgi, consider the Flask documentation on how to do that.
- Adding cronjob
This step is optional, but usefull. The script will check periodically, when the last update message came from a Tor server and sets the Server Status and the Tor Status to a specific value, if the last update is to old.
Change back into the cloned repo and then in the Scripts folder.
Then copy the check_status.py to /opt/ennstatus/ as you need to change it.
sudo mkdir /opt/ennstatus sudo cp check_status.py /opt/ennstatus/
Then open the file in your preffered editor and change the line 35 so represents your data folder in the your cgi-folder
# EXAMPLE DATADIR = "/var/www/status.enn.lu/cgi-bin/data"
Now we add the cronjob
sudo crontab -e # Add the following line */21 * * * * python2 /opt/ennstatus/check_status.py
- Python 3
- A configured tor server
- Configure update_server.py
Create a file in your /etc folder named ennstatus_updater.conf and add the following lines in it.
[main] ennstatus_url = http://YOUR_URL.com/ #Don't forget the trailing slash
- Adding cronjob
Copy the update_server.py from the Scripts folder to a place where you can find it, for example /usr/bin. Then do the following:
sudo crontab -e # Add the following line */10 * * * * python3 /usr/bin/update_server.py
If you want to delete a server, just delete the servername.json file in your data folder and make sure that the Tor server doesn't send an update.