added docker log

This commit is contained in:
2024-03-16 23:39:58 +00:00
parent 90e90d64a2
commit 174b528899
3 changed files with 24 additions and 3 deletions

11
docker/scripts/dockerlog Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
printf $(date '+%Y-%m-%d') >> /proc/1/fd/1;
printf " " >> /proc/1/fd/1;
printf $(date '+%H:%M:%S') >> /proc/1/fd/1;
printf "|%s" $HOSTNAME >> /proc/1/fd/1;
printf "|%s" $DUPLICATI__PARSED_RESULT >> /proc/1/fd/1;
printf "|%s" $DUPLICATI__OPERATIONNAME >> /proc/1/fd/1;
printf "|%s" $DUPLICATI__EVENTNAME >> /proc/1/fd/1;
printf "|%s" $DUPLICATI__backup_name >> /proc/1/fd/1;
printf "|%s" $DUPLICATI__LOCALPATH >> /proc/1/fd/1;
printf "\n" >> /proc/1/fd/1