diff options
Diffstat (limited to 'main/atop/make-cron-background.patch')
-rw-r--r-- | main/atop/make-cron-background.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/main/atop/make-cron-background.patch b/main/atop/make-cron-background.patch new file mode 100644 index 00000000000..a710572cf7b --- /dev/null +++ b/main/atop/make-cron-background.patch @@ -0,0 +1,28 @@ +From a2cd8d902a833e5bec024e81d6361684c1f84e4b Mon Sep 17 00:00:00 2001 +From: ptrcnull <git@ptrcnull.me> +Date: Tue, 1 Mar 2022 15:33:05 +0100 +Subject: [PATCH] Make daily atop cron job run in the background + +--- + atop.daily | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/atop.daily b/atop.daily +index 55737fd..5e18650 100755 +--- a/atop.daily ++++ b/atop.daily +@@ -57,8 +57,7 @@ fi + # + ( (sleep 3; find "$LOGPATH" -name 'atop_*' -mtime +"$LOGGENERATIONS" -exec rm {} \;)& ) + +-# activate atop with an interval of S seconds (configurable), +-# replacing the current shell ++# activate atop with an interval of S seconds (configurable) + # +-echo $$ > $PIDFILE +-exec $BINPATH/atop $LOGOPTS -w "$LOGPATH"/atop_"$CURDAY" "$LOGINTERVAL" > "$LOGPATH/daily.log" 2>&1 ++$BINPATH/atop $LOGOPTS -w "$LOGPATH"/atop_"$CURDAY" "$LOGINTERVAL" > "$LOGPATH/daily.log" 2>&1 & ++echo $! > $PIDFILE +-- +2.35.1 + |