Browse Source

Add a systemd service file for the peerfinder script (contributed by blokje)

Baptiste Jonglez 10 years ago
parent
commit
6e73bb31e2
2 changed files with 28 additions and 1 deletions
  1. 27 0
      static/peerfinder.service.txt
  2. 1 1
      templates/participate.html

+ 27 - 0
static/peerfinder.service.txt

@@ -0,0 +1,27 @@
+# A systemd service for DN42 peerfinder
+#
+# == install ==
+# - Create this file as /etc/systemd/system/peerfinder.service
+# - Create a user peerfinder (Debian: useradd --system peerfinder)
+# - Create the directory /home/peerfinder
+# - Install http://peerfinder.polyno.me/script.sh as /home/peerfinder/peer-finder.sh
+# - Enable with systemctl: systemctl enable peerfinder.service
+# - Start the service: systemctl start peerfinder.service
+#
+# == monitoring ==
+# Script output will be stored in journald, you can view this with:
+#  journalctl -u peerfinder.service
+#
+# Status can be checked with
+#  systemctl status peerfinder.service
+
+[Unit]
+Description=DN42 Peer Finder
+
+[Service]
+ExecStart=/home/peerfinder/peer-finder.sh
+User=peerfinder
+
+[Install]
+WantedBy=multi-user.target
+

+ 1 - 1
templates/participate.html

@@ -37,7 +37,7 @@ to peer.</p>
 
 <p>Currently, two measurement scripts are available, depending on your needs:
   <ul>
-    <li><a href="/script.sh">shell script implemented as a self-contained loop</a></li>
+    <li><a href="/script.sh">shell script implemented as a self-contained loop</a>, along with a <a href="/static/peerfinder.service.txt">systemd service file</a></li>
     <li><a href="/cron.sh">shell script that you can run in cron</a></li>
   </ul>
   For both scripts, you need to edit the UUID variable to put your own UUID.