X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=prof-backup;h=e49cb494a0b121602342e3dec3ce9125c564a8bf;hb=d67edcdca8795a4bca116aa532d02dda246a6f53;hp=f5b99bf3a65bd068dff0bc180fe1af33c7ff4b6d;hpb=768363d8771edb9d9ed82425fa772d77b90139c0;p=distro-setup diff --git a/prof-backup b/prof-backup index f5b99bf..e49cb49 100755 --- a/prof-backup +++ b/prof-backup @@ -17,9 +17,12 @@ # ssh root@kdwg.b8.nz systemctl --now enable profanity if [ -z "$BASH_VERSION" ]; then echo "error: shell is not bash" >&2; exit 1; fi -source /a/bin/errhandle/err +source /a/bin/bash-bear-trap/bash-bear source /a/bin/bash_unpublished/source-state +if [[ ! $HOSTNAME ]]; then + HOSTNAME=$(cat /etc/hostname) +fi if [[ $HOSTNAME != "$HOST2" ]]; then exit 0 fi @@ -31,7 +34,7 @@ case $HOSTNAME in fi ;; *) - if ssh b8.nz systemctl --quiet is-active profanity; then + if ssh iank@b8.nz systemctl --user --quiet is-active profanity; then rsync -a b8.nz:/d/p/profanity{,-config} /p fi ;;