1. Frënn vun der Ënn
  2. Untitled project
  3. EnnStatus

Overview

Ënnstatus

Ënnstatus provides the user with vital information about the status of the organizations Tor servers.

Installation

If you want to install the ennstatus app on your server, to list your own provided Tor server, follow these steps:

Requirements:

  • Python 2.7
  • A webserver with cgi feature (apache, thttpd, lighthttp)
  1. Clone this repo into your homefolder
hg clone https://bitbucket.org/fvde/ennstatus
  1. Install it via pip
cd ennstatus
sudo pip install ./

Note

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
  1. 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

Note

If you want to use fcgi or wsgi, consider the Flask documentation on how to do that.

  1. 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.

cd $HOME/ennstatus/Scripts

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

Adding Tor servers

Requirements:

  • Python 3
  • A configured tor server
  1. 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
  1. 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

Deleting Tor servers

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.