diff --git a/uptime.service b/uptime.service new file mode 100644 index 0000000..8b00748 --- /dev/null +++ b/uptime.service @@ -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 \ No newline at end of file