36 строки
1.5 KiB
Diff
36 строки
1.5 KiB
Diff
From 9cb119713b5e6be43671fe1856fb4bd49ff91fa7 Mon Sep 17 00:00:00 2001
|
|
From: Gerlof Langeveld <gerlof.langeveld@atoptool.nl>
|
|
Date: Tue, 23 Mar 2021 16:50:48 +0100
|
|
Subject: [PATCH] Correct definition of environment variable LOGOPTS The former
|
|
definition of the empty environment variable LOGOPTS in the atop.service file
|
|
(Environment=LOGOPTS="") causes an empty command line parameter for atop
|
|
running in the background. This empty parameter results in an interval timer
|
|
definition of 0 seconds which means that atop only writes one single sample
|
|
to the daily logfile and after that no more! When the environment variable is
|
|
overruled by the definition LOGOPTS="" (or another value) in the file
|
|
/etc/default/atop the problem is bypassed.
|
|
|
|
---
|
|
atop.service | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/atop.service b/atop.service
|
|
index 855e51b..16f24e9 100644
|
|
--- a/atop.service
|
|
+++ b/atop.service
|
|
@@ -3,10 +3,10 @@ Description=Atop advanced performance monitor
|
|
Documentation=man:atop(1)
|
|
|
|
[Service]
|
|
-Environment=LOGOPTS=""
|
|
-Environment=LOGINTERVAL=600
|
|
-Environment=LOGGENERATIONS=28
|
|
-Environment=LOGPATH=/var/log/atop
|
|
+Environment="LOGOPTS="
|
|
+Environment="LOGINTERVAL=600"
|
|
+Environment="LOGGENERATIONS=28"
|
|
+Environment="LOGPATH=/var/log/atop"
|
|
EnvironmentFile=/etc/default/atop
|
|
ExecStartPre=/bin/sh -c 'test -n "$LOGINTERVAL" -a "$LOGINTERVAL" -eq "$LOGINTERVAL"'
|
|
ExecStartPre=/bin/sh -c 'test -n "$LOGGENERATIONS" -a "$LOGGENERATIONS" -eq "$LOGGENERATIONS"'
|