Files
dsnap-sync/find_snapper_config
Ralf Zerres 4c694eb6f3 dsnap-sync: rename project and introduce the fork
o distict the dash version from original work of Wes Barnett
o circumvit any name clashes
2018-06-01 15:21:04 +02:00

16 lines
353 B
Bash
Executable File

#!/bin/sh
etcdirs="sysconfig default conf.d"
for x in $etcdirs; do
d=/etc/$x/snapper
if [ -f $d ]; then
sed -i 's@^SNAPPER_CONFIG=.*@SNAPPER_CONFIG='$d'@g' bin/dsnap-sync
exit 0
fi
done
printf "==> Unable to find snapper configuration file in a standard location.\n"
printf "==> Using SNAPPER_CONFIG make variable.\n"
exit 1