From a24079c614ddc81ee1dc289ebe6c477ab4cd0633 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 14 May 2023 01:11:32 +0200 Subject: [PATCH] Continued: - added check-daemon.sh - you can execcute this by yourself or by cronjob --- check-daemon.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 check-daemon.sh diff --git a/check-daemon.sh b/check-daemon.sh new file mode 100755 index 0000000..4b90d14 --- /dev/null +++ b/check-daemon.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +CHECK=$(screen -list|grep daemon) + +if [ -z "${CHECK}" ] +then + echo "$0: Daemon isn't running, starting in background ..." + screen -dmS daemon python3 api.py +fi -- 2.39.5