systemd service file
[usb-wde1-tools.git] / README.rst
index f118e918b2c79f8cac4c0cba3be35fd9ceae3720..0956fe1ca76ea73003e777f2d7a76b9c63867fb4 100644 (file)
@@ -28,10 +28,16 @@ Setup
 
      $ cd munin && nohup ./usb-wde1-log-last.sh &
 
-   once. It backgrounds the logging process and logs into ``/tmp/usb-wde1-last``.
+   once. It backgrounds the logging process and logs into ``/var/spool/usb-wde1/usb-wde1-last``.
    This process needs to be started whenever the machine is rebooted.
 
-   You can run ``make`` to install the init script.
+   The ``systemd/`` directory contains a ``usb-wde1-log.service`` file you can copy to
+   ``/etc/systemd/system/``. After copying it, run::
+
+     $ systemctl daemon-reload
+     $ systemctl start usb-wde1-log
+     $ systemctl status usb-wde1-log
+     $ systemctl enable usb-wde1-log
 
 2. Link the munin plugin::
 
@@ -39,11 +45,12 @@ Setup
    $ ln -s /usr/local/src/usb-wde1-tools/munin/usb-wde1_ usb-wde1_temperature
    $ ln -s /usr/local/src/usb-wde1-tools/munin/usb-wde1_ usb-wde1_humidity
 
-3. Configure the plugins
-   Edit /etc/munin/plugin-conf.d/munin-node and add the following lines::
+3. Configure the plugins:
+
+   Edit ``/etc/munin/plugin-conf.d/munin-node`` and add the following lines::
 
      [usb-wde1_*]
-     env.logfile /tmp/usb-wde1-last
+     env.logfile /var/spool/usb-wde1/usb-wde1-last
      env.host_name House
      env.sensors 0 1 7
      env.sensor0 Living room