From a732862b9067a67fedde95120adacbce3df65149 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Mon, 10 Mar 2025 03:51:17 +0200 Subject: New tool for backup/restore --- lib/_ak_log | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/_ak_log') diff --git a/lib/_ak_log b/lib/_ak_log index fb39c05..9d6fba0 100755 --- a/lib/_ak_log +++ b/lib/_ak_log @@ -18,6 +18,8 @@ ### along with this program. If not, see . ### +source $AK_LIBDIR/_ak_script + function _ak_log_print_log_line(){ if [ -n "$1" ] then @@ -65,18 +67,18 @@ function _ak_log_grep(){ function _ak_log_rotate(){ if [ -f $AK_LOGSFILE ] then - tar cvfz $AK_ARCHIVESDIR/logs_$(date -u +%s).tar.gz $AK_WORKDIR/logs + tar cvfz $AK_ARCHIVESDIR/logs_$(_ak_datetime_unix).tar.gz $AK_WORKDIR/logs cat /dev/null > $AK_WORKDIR/logs fi if [ -f $AK_WORKDIR/akd.log ] then - tar cvfz $AK_ARCHIVESDIR/akd-logs_$(date -u +%s).tar.gz $AK_WORKDIR/akd.log + tar cvfz $AK_ARCHIVESDIR/akd-logs_$(_ak_datetime_unix).tar.gz $AK_WORKDIR/akd.log cat /dev/null > $AK_WORKDIR/akd.log fi } function _ak_log_message(){ - TS="$(date -u +%s)" + TS="$(_ak_datetime_unix)" if [ ! -z $1 ] && [ -n "$1" ] then prg="$1" -- cgit v1.2.3