sshable=()
sshfail=()
+ min_idle=$((60 * 15))
for h in ${targets[@]}; do
if zone=$(ssh root@$h "mkdir -p /mnt/root/btrbk && date +%z"); then
+ if $cron && xidle=$(ssh iank@$h DISPLAY=:0 xprintidle) && [[ $xidle && $xidle -lt $min_idle ]]; then
+ # This is a separate ssh because xprintidle can fail and thats ok.
+ # Ignore this host. i sometimes use a non-main machine for testing or web browsing, knowing that
+ # everything will be wiped by the next backup, but I dont want it to happen as Im using
+ # it from cronjob.
+ continue
+ fi
sshable+=($h)
if [[ $zone != $local_zone ]]; then
die "error: dont confuse yourself with multiple time zones. $h has different timezone than localhost"
stale_dir=/nocow/btrfs-stale
rm -f $stale_dir/$d
- if [[ $vol == a ]]; then
- # useful to keep this at the latest version
- /a/exe/install-my-scripts
- fi
done
### disabled
$old_shell primary-setup $new_hostname
-/a/bin/distro-setup/install-my-scripts
-
if $localhost_new; then
btrbk-run -s $old_host $mp_args
else