From: Christian Heller Date: Wed, 5 Mar 2025 18:59:45 +0000 (+0100) Subject: Merge branch 'master' of plomlompom.com:/var/repos/config X-Git-Url: https://plomlompom.com/repos/booking/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/%7B%7Bprefix%7D%7D/processes?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=config Merge branch 'master' of plomlompom.com:/var/repos/config --- d3dcfea0e4b5eaac829bee61da0ee84133102638 diff --cc testing/scripts/setup_secrets_user.sh index f2cd5b2,07b60cd..007ee49 --- a/testing/scripts/setup_secrets_user.sh +++ b/testing/scripts/setup_secrets_user.sh @@@ -35,29 -28,5 +35,29 @@@ ssh-keyscan "${REPOS_SITE_DOMAIN}" >> " mkdir "${PATH_REPOS}" cd "${PATH_REPOS}" ssh ${REPOS_SITE_LOGIN} "cd $REMOTE_PATH_REPOS && ls -1" | while read REPO_NAME; do - git clone "${REPOS_SITE_LOGIN}:${REMOTE_PATH_REPOS}/${REPO_NAME}" + git clone --recurse "${REPOS_SITE_LOGIN}:${REMOTE_PATH_REPOS}/${REPO_NAME}" done + +echo "Set up borg and pull in ~/org" +mkdir "${PATH_BORGKEYS}" +tar xf "${PATH_SECRETS}/borg_keyfiles.tar" -C "${PATH_BORGKEYS}" +ls -1 "${PATH_BORGKEYS}/" | while read FILENAME; do + SERVER_NAME=$(echo "${FILENAME}" | sed 's/.*@//') + ssh-keyscan "${SERVER_NAME}" >> "${PATH_KNOWN_HOSTS}" +done +while true; do + set +e + "${NAME_BORGAPP}" orgpull + RESULT=$? + set -e + if [ "${RESULT}" = "0" ]; then + break + elif [ "${RESULT}" != "2" ]; then + echo "Aborting due to unexpected ${NAME_BORGAPP} error." + exit 1 + fi +done + +PATH_REL_DEL_REPO="DELETE_${PATH_REL_REPO}" +mv "${HOME}/${PATH_REL_REPO}" "${HOME}/${PATH_REL_DEL_REPO}" +echo "With ~/repos set up, new reference be ~/repos/${PATH_REL_REPO}; moved ~/${PATH_REL_REPO} to ~/${PATH_REL_DEL_REPO}, ready to be deleted by you."