From 5f3a4323c3ac0e0e8c7dd45d25949157c10f8775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 19 Nov 2020 16:05:49 +0100 Subject: [PATCH] chg: Create logging directory if needed --- etc/systemd/system/lookyloo.service.sample | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etc/systemd/system/lookyloo.service.sample b/etc/systemd/system/lookyloo.service.sample index f455a0d1..9d35adf0 100644 --- a/etc/systemd/system/lookyloo.service.sample +++ b/etc/systemd/system/lookyloo.service.sample @@ -10,7 +10,8 @@ WorkingDirectory= Environment="PATH=:/usr/bin" ExecStart=/bin/bash -c "exec poetry run start" ExecStop=/bin/bash -c "exec poetry run stop" -# check that the log folder exists, if not: sudo mkdir /var/log/lookyloo +# The "+" means the command is executed as root, "-" means the command is allowed to fail. +ExecStartPre=+-/bin/mkdir /var/log/lookyloo StandardOutput=append:/var/log/lookyloo/message.log StandardError=append:/var/log/lookyloo/error.log