diff options
author | Dennis Eriksen <d@ennis.no> | 2023-07-11 10:24:19 +0200 |
---|---|---|
committer | Dennis Eriksen <d@ennis.no> | 2023-07-11 10:24:19 +0200 |
commit | bf3df41f4bf914ae8a800f598dd4a9479e674f13 (patch) | |
tree | 5b66fabdce5cbbe5b898c1fbad2b1a4d6fb0ac86 /energyscripts-SCRIPT@ADDRESS.service | |
parent | updating some requirements, adding req-file for systems without the pkg crypt... (diff) | |
download | energyscripts-bf3df41f4bf914ae8a800f598dd4a9479e674f13.tar.gz |
new systemd-service with some protections
Diffstat (limited to 'energyscripts-SCRIPT@ADDRESS.service')
-rw-r--r-- | energyscripts-SCRIPT@ADDRESS.service | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/energyscripts-SCRIPT@ADDRESS.service b/energyscripts-SCRIPT@ADDRESS.service new file mode 100644 index 0000000..ab26429 --- /dev/null +++ b/energyscripts-SCRIPT@ADDRESS.service @@ -0,0 +1,26 @@ +[Unit] +Description = Simple service to start mqtt-listener +StartLimitIntervalSec = 100 +StartLimitBurst = 5 + +[Service] +User = energy +Group = energy + +Type = simple +EnvironmentFile = /opt/energyscripts/.env +WorkingDirectory = /opt/energyscripts +ExecStart = /opt/energyscripts/venv/bin/python3 -u scripts/%j.py -a %i +Restart = on-failure +TimeoutStopSec = 70 +RestartSec = 30 +SyslogIdentifier = %N + +NoNewPrivileges = true +ProtectHome = tmpfs +ProtectSystem = full +PrivateDevices = true +ReadWritePaths = /opt/energyscripts/queue + +[Install] +WantedBy = default.target |