2024-10-21 14:18:05 +02:00
|
|
|
#!/usr/bin/bash
|
|
|
|
|
|
|
|
# Ramdisk logs path
|
2024-11-12 19:44:52 +01:00
|
|
|
LOG_DIR="/shared/log/ironic/deploy"
|
2024-10-21 14:18:05 +02:00
|
|
|
|
2024-11-12 19:44:52 +01:00
|
|
|
inotifywait -m "${LOG_DIR}" -e close_write |
|
|
|
|
while read -r path _action file; do
|
|
|
|
echo "************ Contents of ${path}/${file} ramdisk log file bundle **************"
|
|
|
|
tar -xOzvvf "${path}/${file}" | sed -e "s/^/${file}: /"
|
|
|
|
rm -f "${path}/${file}"
|
2024-10-21 14:18:05 +02:00
|
|
|
done
|