Move manual hosts definition to configuration file manual_hosts.conf
This commit is contained in:
11
rcopy.sh
11
rcopy.sh
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user