From 4c73ffddb070768ca6e04dcf3f7b4225adcc6ecf Mon Sep 17 00:00:00 2001 From: MaximilianKohler Date: Sun, 24 Dec 2023 04:25:05 -0800 Subject: [PATCH] Update listmonk-simple.service - add optional log file https://github.com/knadh/listmonk/pull/1614#issuecomment-1868504363 --- listmonk-simple.service | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/listmonk-simple.service b/listmonk-simple.service index 5fa9ec1cb..4a0d8b113 100644 --- a/listmonk-simple.service +++ b/listmonk-simple.service @@ -24,13 +24,14 @@ RestartSec=5 # to the end of the ExecStart line above after creating the dir and fetching the files with: # mkdir -p /etc/listmonk/static ; wget -O - https://github.com/knadh/listmonk/archive/master.tar.gz | tar xz -C /etc/listmonk/static --strip=2 "listmonk-master/static" -# Set user to run listmonk service as (instead of root), and folders it can write to. +# To enable a log file that persists after restarts, replace the ExecStart= line with: +# ExecStart=/bin/bash -ce "exec /usr/bin/listmonk --config /etc/listmonk/config.toml --static-dir /etc/listmonk/static >>/etc/listmonk/listmonk.log 2>&1" + +# Set user to run listmonk service as (instead of root). # Can use "DynamicUser=" instead, if your systemd version is >= 232. # https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#DynamicUser= #User= #StateDirectory=/etc/listmonk -#LogsDirectory=/etc/listmonk -#CacheDirectory=/etc/listmonk/cache #Environment=HOME=/usr/bin # Use systemd’s ability to disable security-sensitive features