diff options
Diffstat (limited to 'config/systemd')
-rw-r--r-- | config/systemd/power-logger.service | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/config/systemd/power-logger.service b/config/systemd/power-logger.service new file mode 100644 index 0000000..8774f96 --- /dev/null +++ b/config/systemd/power-logger.service @@ -0,0 +1,25 @@ +[Unit] +Description=power-logger +After=network.target +StartLimitIntervalSec=0 + +[Service] +Type=simple +Restart=always +RestartSec=1 +User=power-logger +Group=power-logger +Environment=GEM_HOME=/usr/local/lib/ruby/gems +StandardOutput=syslog +StandardError=syslog +SyslogIdentifier=power-logger +PIDFile=/run/power_logger/logger.pid +PermissionsStartOnly=true +ExecStartPre=mkdir -p /run/power_logger /var/log/power_logger /usr/local/share/power_logger +ExecStartPre=rm -f /run/power_logger/receiver.pid +ExecStartPre=chown -R power-logger:power-logger /run/power_logger /var/log/power_logger /usr/local/share/power_logger +ExecStopPost=rm -f /run/power_logger/logger.pid +ExecStart=/usr/local/src/power_logger/power-logger + +[Install] +WantedBy=multi-user.target |