Add debug mode and additional loggin

This commit is contained in:
Antonio Calanducci 2024-07-11 08:45:35 +00:00
parent 338257abca
commit 12eb408429
2 changed files with 16 additions and 2 deletions

View File

@ -1,7 +1,7 @@
FROM alpine:latest
RUN apk update && \
apk add --no-cache openssh-client nfs-utils zstd
apk add --no-cache openssh-client zstd tar
# RUN mkdir -p /mnt/nfs

View File

@ -8,6 +8,20 @@ FTP_PATH=$FTP_PATH
# mount -t nfs $NFS_SERVER:$NFS_PATH /mnt/nfs
echo "Start copying via FTP $FTP_PATH"
sftp -i /root/.ssh/id_rsa -o StrictHostKeyChecking=no $FTP_USER@$FTP_SERVER:$FTP_PATH /mnt/beacon_data
cd /mnt/beacon_data
umount /mnt/beacon_data
echo "Unpacking the data"
tar -I zstd -xvf *.tar.zst
echo "Deleting the tar.zst"
rm *.tar.zst
if [ -n "$DEBUG" ]; then
echo "In debug mode, you need to kill manually the container"
tail -f /dev/null
fi
# umount /mnt/beacon_data