Changeset - 1abafdd2a20f
[Not reviewed]
Merge default
0 2 2
Dennis Fink - 11 years ago 2014-01-21 19:03:04
dennis.fink@c3l.lu
merge
4 files changed with 38 insertions and 11 deletions:
0 comments (0 inline, 0 general)
Scripts/update_server.pl
Show inline comments
 
@@ -10,16 +10,22 @@ by virii
 
use HTTP::Tiny;
 
use IO::Socket;
 
######## [defaults] ########
 
$data_dir = '/var/lib/tor';
 
$pidfile  = '/var/run/tor/tor.pid';
 
######## [ennstatus URL] ########
 
open ennstatus, "<", "/etc/ennstatus_updater.conf" || die "Ennstatus config file not found!\n";
 
@configs = @ARGV if @ARGV;					 # perl updater_server.pl torrc torrc0 torrc1
 
@configs = qw(torrc torrc2) unless @ARGV;			 # OR hardcode every config file! like: torrc torrc0 torrc1 
 
$data_dir = '/var/lib/tor';					 # default data dir
 
$pidfile  = '/var/run/tor/tor.pid';				 # default pid file
 
$API_url = 'http://enn.lu';					 # will be ignored if /etc/ennstatus_updater.conf is present
 
######## [ennstatus URL - config file] ######
 
if (-e '/etc/ennstatus_updater.conf') {
 
	open ennstatus, "<", "/etc/ennstatus_updater.conf" || die "Cannot open 'ennstatus_updater.conf'!\n";
 
    while (<ennstatus>) {
 
        $ennstatus_url = $1 if /^ennstatus_url = (.+)/i;
 
    }
 
close ennstatus;
 
} else {
 
	$ennstatus_url = $API_url;
 
}
 
######## [loop through configs] ########
 
@configs = qw(torrc);                                                   # every config file! like: torrc torrc0 torrc1 
 
for (1..scalar @configs) {
 
    open config, "<", "/etc/tor/" . $configs[$_ -1] || die "Cannot open $configs[$_ -1]\n";
 
        while (<config>) {
 
@@ -58,8 +64,6 @@ for (1..scalar @configs) {
 
    } else {
 
        $tor_status = 'Offline';
 
    }
 
######## [end of loop] ########
 
}
 
######## [create json string] ########    
 
if ($server_type eq "Bridge") {
 
$json_string = '{"fingerprint": "' . $fingerprint .
 
@@ -86,4 +90,6 @@ if ($server_type eq "Bridge") {
 
                                    );
 

	
 
print $request->{content};
 
######## [end of loop] ########
 
}
 

	
ennstatus/static/images/BPM.gif
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
ennstatus/templates/donate/bpm.html
Show inline comments
 
new file 100644
 
{% extends "base.html" %}
 

	
 
{% set title = "Donate - Flattr" %}
 

	
 
{% block content %}
 
  <div class="col-md-4 text-center">
 
    <img src="{{ url_for('static', filename='images/bpm.gif') }}" class="img-rounded" alt="BPM"></img>
 
    <h2>BPM Points</h2>
 
  </div>
 
  <div class="col-md-8">
 
    <blockquote>
 
      <p>"<em>Privacy is not something that I'm merely entitled to, it's an absolute prerequisite.</em>"</p>
 
      <small>Marlon Brando<cite>brainyquote</cite></small>
 
    </blockquote>
 

	
 
    <p>We accept <strong>BPM</strong> points as they will be used for our BPM Parcel Station. The parcel station is used for receiving and sending mails and packages around the world!</p>
 
    <div class="alert-info text-center">
 
	    <a href="mailto:info@fvde.lu">Mail us your BPM voucher code!</a>
 
    </div>
 
  </div>
 
{% endblock %}
ennstatus/templates/donate/index.html
Show inline comments
 
@@ -74,10 +74,10 @@
 
    <div class="col-md-4">
 
      <div class="thumbnail">
 
        <center>
 
          <a href="{{ url_for('root.contact') }}"><img src="{{ url_for('static', filename='images/QuestionMark.png') }}" width="135" height="135"></img></a>
 
          <h5>Alternatives</h5>
 
          <p>Tell us</p>
 
          <a class="btn btn-info" href="{{ url_for('root.contact') }}">Take Action Now</a>
 
          <a href="{{ url_for('root.contact') }}"><img src="{{ url_for('static', filename='images/BPM.gif') }}" width="135" height="135"></img></a>
 
          <h5>BPM Points</h5>
 
          <p>For our parcel station!</p>
 
          <a class="btn btn-info" href="{{ url_for('donate.bpm') }}">Take Action Now</a>
 
        </center>
 
      </div>
 
    </div>
0 comments (0 inline, 0 general)