bacula/bacula-checkconf
2012-01-20 16:45:45 +01:00

18 lines
360 B
Bash

#!/bin/sh
# Check if we still have our @@PLACEHOLDERS@@ in the config.
# If yes, refuse to start, the user has never touched the config.
if [ $# -ne 1 ]; then
echo "Usage: $0 [configfile]"
exit 1
fi
grep -q '^[^#].*_PASSWORD@@' $1
if [ $? -eq 0 ]; then
logger -st bacula-dir "Error: placeholder password in config file $1"
exit 6
fi
exit 0