Temporary fix for parsing backup conf

This commit is contained in:
dpeca 2020-03-23 01:21:57 +01:00
parent 931fb5beeb
commit a5712542d7
2 changed files with 3 additions and 2 deletions

View file

@ -479,7 +479,8 @@ if [ "$USER" != '*' ]; then
exclusion=$(echo "$USER" |tr ',' '\n' |grep "^$udir$")
if [ -z "$exclusion" ]; then
((i ++))
udir_list="$udir_list $udir"
udir_str=$(echo "$udir" |sed -e "s|'|\\\'|g")
udir_list="$udir_list $udir_str"
echo -e "$(date "+%F %T") adding $udir" |tee -a $BACKUP/$user.log
# Backup files and dirs

View file

@ -22,7 +22,7 @@ json_list() {
i=1
objects=$(grep BACKUP $USER_DATA/backup.conf |wc -l)
echo "{"
while read str; do
while read -r str; do
eval $str
echo -n ' "'$BACKUP'": {
"TYPE": "'$TYPE'",