From 6d3023a38aabf08d20041d5652eba1729408f778 Mon Sep 17 00:00:00 2001 From: David Kozinn Date: Wed, 24 Jan 2024 18:21:58 +0000 Subject: [PATCH] Fix logrotate for per-service logs --- install.sh | 12 ++++++------ nasabot.logrotate | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index 23c9621..d1ca49c 100755 --- a/install.sh +++ b/install.sh @@ -6,12 +6,12 @@ export LIB=$HOME/.local/lib/python-local/nasautils export LOGDIR=/etc/logrotate.d export SYSTEMCTL=systemctl # Uncomment below for debug -export PIP=echo -export SYSTEM=/tmp/test -export BIN=/tmp/bin -export LIB=/tmp/lib -export LOGDIR=/tmp/logdir -export SYSTEMCTL=echo +# export PIP=echo +# export SYSTEM=/tmp/test +# export BIN=/tmp/bin +# export LIB=/tmp/lib +# export LOGDIR=/tmp/logdir +# export SYSTEMCTL=echo # Next two save the local context so running as sudo can find them export home=$HOME diff --git a/nasabot.logrotate b/nasabot.logrotate index 3db212b..f94afff 100644 --- a/nasabot.logrotate +++ b/nasabot.logrotate @@ -8,8 +8,8 @@ notifempty create postrotate - systemctl restart nasamodqbot - systemctl restart nasapostbot + systemctl restart "nasamodqbot@*" + systemctl restart "nasapostbot@*" systemctl restart nasaxpost endscript }