diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/10-ssh/install.sh | 34 | ||||
-rw-r--r-- | modules/10-ssh/ssh/config | bin | 0 -> 221 bytes | |||
-rw-r--r-- | modules/10-ssh/ssh/id_ed25519 | bin | 0 -> 466 bytes | |||
-rw-r--r-- | modules/10-ssh/ssh/id_ed25519.pub | bin | 0 -> 115 bytes | |||
-rw-r--r-- | modules/10-ssh/ssh/id_ed25519_legacy | bin | 0 -> 466 bytes | |||
-rw-r--r-- | modules/10-ssh/ssh/id_ed25519_legacy.pub | bin | 0 -> 115 bytes | |||
-rw-r--r-- | modules/10-ssh/ssh/id_katy | bin | 0 -> 2624 bytes | |||
-rw-r--r-- | modules/10-ssh/ssh/id_katy.pub | bin | 0 -> 587 bytes | |||
-rw-r--r-- | modules/10-ssh/ssh/id_rsa | bin | 0 -> 2657 bytes | |||
-rw-r--r-- | modules/10-ssh/ssh/id_rsa.pub | bin | 0 -> 587 bytes | |||
-rw-r--r-- | modules/10-ssh/ssh/id_rsa_legacy | bin | 0 -> 2657 bytes | |||
-rw-r--r-- | modules/10-ssh/ssh/id_rsa_legacy.pub | bin | 0 -> 587 bytes | |||
-rw-r--r-- | modules/10-ssh/ssh/id_rsync | bin | 0 -> 421 bytes | |||
-rw-r--r-- | modules/10-ssh/ssh/id_rsync.pub | bin | 0 -> 115 bytes | |||
-rw-r--r-- | modules/10-ssh/ssh/known_hosts | bin | 0 -> 8563 bytes | |||
-rw-r--r-- | modules/10-ssh/ssh/known_hosts.old | bin | 0 -> 8391 bytes |
16 files changed, 34 insertions, 0 deletions
diff --git a/modules/10-ssh/install.sh b/modules/10-ssh/install.sh new file mode 100644 index 0000000..8fb3145 --- /dev/null +++ b/modules/10-ssh/install.sh @@ -0,0 +1,34 @@ +_script="$(realpath ${BASH_SOURCE[0]})" +_scriptname="$(basename $_script)" +_scriptdir="$(dirname $_script)" +_modulename="$(basename $_scriptdir)" +DOT_MODULE_NAME="ssh" + +function preinstall() { + if ! [[ -x "$(command -v ssh)" ]]; then + PACKAGES+=("openssh") + fi + if ! [[ -x "$(command -v git-crypt)" ]]; then + PACKAGES+=("git-crypt") + fi +} + +function install() { + git-crypt unlock + + if [[ "$?" -ne "0" ]]; then + log error "error decrypting ssh files, bailing before we break anthing" + return + fi + + # backup old file if it exists and we haven't backed it up before + if [[ -d "$HOME/.ssh" ]] && ! [[ -d "$HOME/.ssh.bak" ]] && ! [[ -f "$_scriptdir/.firstrun" ]]; then + log verbose "making backup" + cp -r "$HOME/.ssh" "$HOME/.ssh.bak" + touch "$_scriptdir/.firstrun" + fi + + log info "linking ~/.ssh" + rm -rf "$HOME/.ssh" + ln -sf "$_scriptdir/ssh" "$HOME/.ssh" +} diff --git a/modules/10-ssh/ssh/config b/modules/10-ssh/ssh/config Binary files differnew file mode 100644 index 0000000..fc90c1b --- /dev/null +++ b/modules/10-ssh/ssh/config diff --git a/modules/10-ssh/ssh/id_ed25519 b/modules/10-ssh/ssh/id_ed25519 Binary files differnew file mode 100644 index 0000000..fa5c8ee --- /dev/null +++ b/modules/10-ssh/ssh/id_ed25519 diff --git a/modules/10-ssh/ssh/id_ed25519.pub b/modules/10-ssh/ssh/id_ed25519.pub Binary files differnew file mode 100644 index 0000000..663d9c2 --- /dev/null +++ b/modules/10-ssh/ssh/id_ed25519.pub diff --git a/modules/10-ssh/ssh/id_ed25519_legacy b/modules/10-ssh/ssh/id_ed25519_legacy Binary files differnew file mode 100644 index 0000000..fa5c8ee --- /dev/null +++ b/modules/10-ssh/ssh/id_ed25519_legacy diff --git a/modules/10-ssh/ssh/id_ed25519_legacy.pub b/modules/10-ssh/ssh/id_ed25519_legacy.pub Binary files differnew file mode 100644 index 0000000..663d9c2 --- /dev/null +++ b/modules/10-ssh/ssh/id_ed25519_legacy.pub diff --git a/modules/10-ssh/ssh/id_katy b/modules/10-ssh/ssh/id_katy Binary files differnew file mode 100644 index 0000000..9b99dc0 --- /dev/null +++ b/modules/10-ssh/ssh/id_katy diff --git a/modules/10-ssh/ssh/id_katy.pub b/modules/10-ssh/ssh/id_katy.pub Binary files differnew file mode 100644 index 0000000..b118bcf --- /dev/null +++ b/modules/10-ssh/ssh/id_katy.pub diff --git a/modules/10-ssh/ssh/id_rsa b/modules/10-ssh/ssh/id_rsa Binary files differnew file mode 100644 index 0000000..219071e --- /dev/null +++ b/modules/10-ssh/ssh/id_rsa diff --git a/modules/10-ssh/ssh/id_rsa.pub b/modules/10-ssh/ssh/id_rsa.pub Binary files differnew file mode 100644 index 0000000..cae0988 --- /dev/null +++ b/modules/10-ssh/ssh/id_rsa.pub diff --git a/modules/10-ssh/ssh/id_rsa_legacy b/modules/10-ssh/ssh/id_rsa_legacy Binary files differnew file mode 100644 index 0000000..219071e --- /dev/null +++ b/modules/10-ssh/ssh/id_rsa_legacy diff --git a/modules/10-ssh/ssh/id_rsa_legacy.pub b/modules/10-ssh/ssh/id_rsa_legacy.pub Binary files differnew file mode 100644 index 0000000..cae0988 --- /dev/null +++ b/modules/10-ssh/ssh/id_rsa_legacy.pub diff --git a/modules/10-ssh/ssh/id_rsync b/modules/10-ssh/ssh/id_rsync Binary files differnew file mode 100644 index 0000000..3e6b73d --- /dev/null +++ b/modules/10-ssh/ssh/id_rsync diff --git a/modules/10-ssh/ssh/id_rsync.pub b/modules/10-ssh/ssh/id_rsync.pub Binary files differnew file mode 100644 index 0000000..066d6b8 --- /dev/null +++ b/modules/10-ssh/ssh/id_rsync.pub diff --git a/modules/10-ssh/ssh/known_hosts b/modules/10-ssh/ssh/known_hosts Binary files differnew file mode 100644 index 0000000..be2db8a --- /dev/null +++ b/modules/10-ssh/ssh/known_hosts diff --git a/modules/10-ssh/ssh/known_hosts.old b/modules/10-ssh/ssh/known_hosts.old Binary files differnew file mode 100644 index 0000000..b34f3ff --- /dev/null +++ b/modules/10-ssh/ssh/known_hosts.old |