diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2025-03-10 03:51:17 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2025-03-10 03:51:17 +0200 |
commit | a732862b9067a67fedde95120adacbce3df65149 (patch) | |
tree | a0148d1c1d146660c7826c59165eccb4b709a6ca /lib/_ak_log | |
parent | 42daa97e3408e069a767a9e7bfbd8518cf6ec0f4 (diff) | |
download | arching-kaos-tools-a732862b9067a67fedde95120adacbce3df65149.tar.gz arching-kaos-tools-a732862b9067a67fedde95120adacbce3df65149.tar.bz2 arching-kaos-tools-a732862b9067a67fedde95120adacbce3df65149.zip |
New tool for backup/restore
Diffstat (limited to 'lib/_ak_log')
-rwxr-xr-x | lib/_ak_log | 8 |
1 files changed, 5 insertions, 3 deletions
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 <http://www.gnu.org/licenses/>. ### +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" |