From 7c461d3ed31a1805b30e5701873ad702a64ba0de Mon Sep 17 00:00:00 2001 From: xengineering Date: Fri, 12 Feb 2021 17:10:48 +0100 Subject: Avoid systemd Unit Installation in case of no Framework --- manage.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/manage.py b/manage.py index c293106..351ede6 100644 --- a/manage.py +++ b/manage.py @@ -149,14 +149,16 @@ def uninstall_flask(settings): def install_systemd_file(settings): """Install the Systemd Unit for launching the dynamic Web Server""" - subprocess.call("sudo install -Dm 644 systemd/build/{0}.service /etc/systemd/system/{0}.service".format(settings["project_name"]), shell=True) - subprocess.call("sudo systemctl daemon-reload", shell=True) + if settings["framework"] != None: + subprocess.call("sudo install -Dm 644 systemd/build/{0}.service /etc/systemd/system/{0}.service".format(settings["project_name"]), shell=True) + subprocess.call("sudo systemctl daemon-reload", shell=True) def uninstall_systemd_file(settings): """Uninstall the Systemd Unit for launching the dynamic Web Server""" - subprocess.call("sudo rm /etc/systemd/system/{0}.service".format(settings["project_name"]), shell=True) + if settings["framework"] != None: + subprocess.call("sudo rm /etc/systemd/system/{0}.service".format(settings["project_name"]), shell=True) def main(): -- cgit v1.2.3-70-g09d2