Added automatic restart to systemd service

This commit is contained in:
Domen Tabernik 2020-07-28 14:36:58 +02:00 committed by GitHub
parent 5c4b9159b0
commit 2220c56aac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -2,14 +2,23 @@
Description=GPU-based controller of SUPERMICRO server FANs Description=GPU-based controller of SUPERMICRO server FANs
After=syslog.target nvidia-persistenced.service After=syslog.target nvidia-persistenced.service
StartLimitIntervalSec=500
StartLimitBurst=5
[Service] [Service]
Type=simple Type=simple
User=root User=root
Group=root Group=root
Environment="PYTHONUNBUFFERED=true" Environment="PYTHONUNBUFFERED=true"
ExecStart=/placeholder/path/to/superfans-gpu-controller "/etc/superfans-gpu-controller.json" ExecStart=/placeholder/path/to/superfans-gpu-controller "/etc/superfans-gpu-controller.json"
StandardOutput=syslog StandardOutput=syslog
StandardError=syslog StandardError=syslog
Restart=on-failure
RestartSec=5s
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target