mirror of
https://github.com/FAUSheppy/no-secrets-athq-ansible
synced 2025-12-06 09:01:38 +01:00
feat: empty file check to slapd backup
This commit is contained in:
@@ -9,6 +9,14 @@ rsync -r --remove-source-files sheppy@192.168.122.112:$DIR /home/sheppy
|
||||
|
||||
rsync --delete --rsh="/usr/bin/sshpass -p HISTORY_PURGED_SECRET ssh -p23" -r slapd_backup/* u244665-sub2@u244665.your-storagebox.de:./slapd_backup/
|
||||
|
||||
for file in "$DIR"/*; do
|
||||
# Check if the file is empty
|
||||
if [ ! -s "$file" ]; then
|
||||
echo "Empty file found: $file"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
curl -H "Content-Type: application/json" \
|
||||
-X POST https://async-icinga.atlantishq.de/report \
|
||||
-d '{ "service" : "slapd_backup", "token" : "HISTORY_PURGED_SECRET", "status" : "OK", "info" : "" }'
|
||||
|
||||
Reference in New Issue
Block a user