From 14444cd28709acbbdda1b767aaa29a1d916f5b42 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 29 Jun 2023 09:52:06 +0200 Subject: [PATCH] Continued: - daemon.py can be easily executable - also need to rename it in __main__ --- check-daemon.sh | 2 +- daemon.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) mode change 100644 => 100755 daemon.py diff --git a/check-daemon.sh b/check-daemon.sh index 91fb023..cce1339 100755 --- a/check-daemon.sh +++ b/check-daemon.sh @@ -5,5 +5,5 @@ CHECK=$(screen -list|grep daemon) if [ -z "${CHECK}" ] then echo "$0: Daemon isn't running, starting in background ..." - screen -dmS daemon python3 daemon.py + screen -dmS daemon ./daemon.py fi diff --git a/daemon.py b/daemon.py old mode 100644 new mode 100755 index 282b681..7ec401f --- a/daemon.py +++ b/daemon.py @@ -1,3 +1,6 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + # Fedi API Block - An aggregator for fetching blocking data from fediverse nodes # Copyright (C) 2023 Free Software Foundation # @@ -363,4 +366,4 @@ def robots(request: Request): }) if __name__ == "__main__": - uvicorn.run("api:router", host=config.get("host"), port=config.get("port"), log_level=config.get("log_level")) + uvicorn.run("daemon:router", host=config.get("host"), port=config.get("port"), log_level=config.get("log_level")) -- 2.39.5