Add uptime.service

This commit is contained in:
smallsolar 2024-05-02 07:22:31 +00:00
parent d4d5ee3a7c
commit 640a605814
1 changed files with 16 additions and 0 deletions

16
uptime.service Normal file
View File

@ -0,0 +1,16 @@
[Unit]
Description = Uptime
After = network.target
[Service]
Type = simple
Environment="PATH=/root/uptime/venv/bin"
ExecStart = python3 /root/uptime/sys_uptime.py
User = root
Group = root
Restart = on-failure
RestartSec = 5
TimeoutStartSec = infinity
[Install]
WantedBy = multi-user.target