X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=btrbk-run;h=fa20061128281857e82fcfd444225cb147e4158e;hp=e30c9c3dd3667d259a46e560773890e3919dd9a9;hb=9d21aed0c95e0c343f2769a724d9dbb220874185;hpb=f7eaad64a7c5f3bc851f146e1f258d34f398a7d7 diff --git a/btrbk-run b/btrbk-run index e30c9c3..fa20061 100644 --- a/btrbk-run +++ b/btrbk-run @@ -247,7 +247,14 @@ fi echo "mountpoints: ${mountpoints[*]}" +##### end command line parsing ######## +if [[ $source ]]; then + if [[ $(ssh $source systemctl is-active btrbk.service) != inactive ]]; then + echo "$0: error: cron btrbk is running on source. exiting out of caution" + exit 1 + fi +fi # pull_reexec stops us from getting into an infinite loop if there is some # kind of weird problem @@ -270,7 +277,6 @@ if ! $pull_reexec && [[ $source ]] && $pulla ; then fi -##### end command line parsing ########