Move manual hosts definition to configuration file manual_hosts.conf

This commit is contained in:
2019-06-26 12:43:54 +02:00
parent c31323a439
commit 6e83231078
4 changed files with 20 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ if $manual ; then
## -
send_reminder=false
restart_samba_service=false
manual_hosts_file="${rcopy_base_dir}/conf/manual_hosts.conf"
fi
## - Note: the file "/var/lib/logrotate/status" must have
@@ -235,8 +236,16 @@ fi
## - searching hosts for backup
## -
host_scripts=""
if $manual ; then
host_scripts="${hosts_base_dir}/localhost.sh"
if [[ -f "$manual_hosts_file" ]] ; then
source "$manual_hosts_file"
for script in $hosts ; do
host_scripts="$host_scripts ${hosts_base_dir}/${script}.sh"
done
else
host_scripts="${hosts_base_dir}/localhost.sh"
fi
else
host_scripts=`$find $hosts_base_dir -maxdepth 1 -type f -perm -700 | $sort`
fi