Browse Source

Provide the script directly from the home page

Baptiste Jonglez 10 years ago
parent
commit
066ab7553a
2 changed files with 11 additions and 0 deletions
  1. 5 0
      peerfinder.py
  2. 6 0
      templates/home.html

+ 5 - 0
peerfinder.py

@@ -216,6 +216,11 @@ def create_participant():
     else:
         return "Invalid arguments"
 
+@app.route('/script.sh')
+def get_script():
+    r = render_template('run.sh', peerfinder=app.config["PEERFINDER_DN42"])
+    return r, 200, {'Content-Type': 'text/x-shellscript'}
+
 @app.route('/target/<uuid>')
 def get_next_target(uuid):
     """"Returns the next target to ping for the given participant"""

+ 6 - 0
templates/home.html

@@ -111,6 +111,8 @@ lower latency in dn42 than over the Internet, for the same destination
 requests, perform ping measurements, and report back the results.  You're
 welcome to add your own machines to the pool!</p>
 
+<h3>Registering a worker</h3>
+
 <p>You need to separately register each computer that will provide
 measurements.  Manual validation is performed for each registration.</p>
 
@@ -126,6 +128,10 @@ Free-form comment, like tunnel technology (GRE, OpenVPN, ...), or things like &q
 <input type="submit" value="Register" />
 </form>
 
+<h3>Measurement script</h3>
+
+<p>The measurement script can be accessed <a href="/script.sh">here</a>.
+You need to edit the UUID.</p>
 
 <h2>Known issues</h2>