From 640a60581472d8e273b2fc1feceadbad471b8532 Mon Sep 17 00:00:00 2001 From: smallsolar Date: Thu, 2 May 2024 07:22:31 +0000 Subject: [PATCH] Add uptime.service --- uptime.service | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 uptime.service 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