backbit/src/backbit

41 lines
527 B
Text
Raw Normal View History

2019-10-07 11:42:28 +02:00
#!/bin/bash
2019-10-07 12:11:13 +02:00
confDir=/etc/backbit
if [ ! -z $1 -a -d $1 ]
2019-10-07 11:42:28 +02:00
then
confDir=$1
fi
logDir=/var/log/backbit
if [ ! -d $logDir ]
then
mkdir -p $logDir
chmod 700 $logDir
fi
if [ -x $confDir/before.sh ]
then
. $confDir/before.sh
fi
for $conf in $(ls $confDir/db/*)
do
( source $conf
$(which backbitdb) > $logDir/$dbName.log
)
done
for $conf in $(ls $confDir/dir/*)
do
( source $conf
$(which backbitdir) > $logDir/$name.log
)
done
if [ -x $confDir/after.sh ]
then
. $confDir/after.sh
fi