From 4aed14ded3a6ac190f15ffcaff72d60f5171240b Mon Sep 17 00:00:00 2001 From: Shaun Maher Date: Tue, 10 Oct 2023 19:40:03 +1100 Subject: [PATCH] Updating submodules --- .submodules/tooling | 2 +- tooling/run_syncoid.sh | 29 ++++++----------------------- 2 files changed, 7 insertions(+), 24 deletions(-) mode change 100644 => 100755 tooling/run_syncoid.sh diff --git a/.submodules/tooling b/.submodules/tooling index b874811..f1ffb2d 160000 --- a/.submodules/tooling +++ b/.submodules/tooling @@ -1 +1 @@ -Subproject commit b8748111c3f0449cbae5c13a81268b6e14517be0 +Subproject commit f1ffb2de3297467a8fcd5c5736a02eda07c92d68 diff --git a/tooling/run_syncoid.sh b/tooling/run_syncoid.sh old mode 100644 new mode 100755 index ef69692..2019f8d --- a/tooling/run_syncoid.sh +++ b/tooling/run_syncoid.sh @@ -1,3 +1,9 @@ +#!/usr/bin/env bash + +# Load boilerplate functions +function Source() { local ScriptName="$1" ; shift ; source "$ScriptName" ; } +Source "$(dirname "$(readlink -f "${0}")")/bash-boilerplate/source" || exit 1 + SSH_REMOTE_HOST="${SSH_REMOTE_HOST:-"ph3.local"}" SSH_USERNAME="${SSH_USERNAME:-"syncoid"}" SSH_PORT="${SSH_PORT:-10022}" @@ -17,29 +23,6 @@ if [ "${HOME}" == "" ]; then export HOME=$(getent passwd "${USER}" | awk 'BEGIN{FS=":"}{print $6}') fi -RED='\033[1;31m' -GREEN='\033[1;32m' -YELLOW='\033[1;33m' -GRAY='\033[1;90m' -NC='\033[0m' # No Color -export - -function verbose() { - printf '%b\n' "${YELLOW}${1}${NC}" -} - -function debug() { - printf '%b\n' "${GRAY}${1}${NC}" -} - -function info() { - printf '%b\n' "${GREEN}${1}${NC}" -} - -function error() { - printf '%b\n' "${RED}${1}${NC}" -} - # Create and populate a ~/.ssh/config file # TODO: This need to be expandable to multiple remote targets mkdir -p "${HOME}/.ssh"