feat: support setting amanda config by env variable

closes #51
This commit is contained in:
Dominik Meyer 2024-08-16 20:08:35 +02:00
parent ea1a07ef58
commit 3a008c1595
Signed by: byterazor
GPG Key ID: EABDA0FD5981BC97

View File

@ -1,8 +1,13 @@
#!/bin/bash
amcleanup -k server
amcheck server
amdump server
amstatus server
if [ -z ${AMANDA_CONFIG} ]; then
echo "it set best practise to set the AMANDA_CONFIG environment variable"
AMANDA_CONFIG="server"
fi
amcleanup -k ${AMANDA_CONFIG}
amcheck ${AMANDA_CONFIG}
amdump ${AMANDA_CONFIG}
amstatus ${AMANDA_CONFIG}
exit 0