diff options
author | EuAndreh <eu@euandre.org> | 2020-08-10 12:15:49 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-08-10 12:45:43 -0300 |
commit | 100ab568e3aeb512e86fd1155a73454d22e24895 (patch) | |
tree | 1d7ff9168b8cfc60e173f2a19f30938bc68d0f6e /scripts/box | |
parent | WIP: Move to Vultr and NixOS (diff) | |
download | server-100ab568e3aeb512e86fd1155a73454d22e24895.tar.gz server-100ab568e3aeb512e86fd1155a73454d22e24895.tar.xz |
Migration: Remove Ansible and Docker code, move only to NixOS
Diffstat (limited to 'scripts/box')
-rwxr-xr-x | scripts/box/bash-profile.sh | 5 | ||||
-rwxr-xr-x | scripts/box/create-backup.env.sh | 14 | ||||
-rwxr-xr-x | scripts/box/restore-backup.env.sh | 21 | ||||
-rwxr-xr-x | scripts/box/user-data.env.sh | 11 |
4 files changed, 0 insertions, 51 deletions
diff --git a/scripts/box/bash-profile.sh b/scripts/box/bash-profile.sh deleted file mode 100755 index c024dbd..0000000 --- a/scripts/box/bash-profile.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -# shellcheck disable=SC2164 - -alias l="ls -lahp --color" -cd /home/vps/ diff --git a/scripts/box/create-backup.env.sh b/scripts/box/create-backup.env.sh deleted file mode 100755 index f5cd3b0..0000000 --- a/scripts/box/create-backup.env.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -set -Eeuo pipefail - -export BORG_REMOTE_PATH="${BORG_REMOTE_PATH}" -export BORG_PASSPHRASE="${BORG_PASSPHRASE}" -# The configured $BORG_REPO is already the rsync remote. -# No need to send the files after the backup is done. -borg create \ - --verbose \ - --stats \ - --progress \ - --compression lzma,6 \ - "${BORG_REPO}::{hostname}-{now}-${VPS_COMMIT_SHA}" \ - "${VOLUME_HOME}"/* diff --git a/scripts/box/restore-backup.env.sh b/scripts/box/restore-backup.env.sh deleted file mode 100755 index 151ded5..0000000 --- a/scripts/box/restore-backup.env.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -set -Eeuo pipefail - -export BORG_REMOTE_PATH="${BORG_REMOTE_PATH}" -export BORG_PASSPHRASE="${BORG_PASSPHRASE}" - -pushd "$(mktemp -d)" || exit 1 - -# It is actually being used below using the DOLLAR interpolation -# shellcheck disable=SC2034 -ARCHIVE="$(borg list "${BORG_REPO}" --last 1 --short)" - -echo "Extracting archive ${DOLLAR}{ARCHIVE}" -borg extract \ - --verbose \ - --progress \ - "${BORG_REPO}::${DOLLAR}{ARCHIVE}" -echo "Done." - -mv home/vps/volumes/* /home/vps/volumes/ -popd || exit 1 diff --git a/scripts/box/user-data.env.sh b/scripts/box/user-data.env.sh deleted file mode 100755 index f9da5d7..0000000 --- a/scripts/box/user-data.env.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -# shellcheck disable=SC2016 - -echo '$SSH_SERVER_PRIVATE_KEY' > /etc/ssh/vps-box-server -chmod 400 /etc/ssh/vps-box-server -echo '$SSH_SERVER_PUBLIC_KEY' > /etc/ssh/vps-box-server.pub -echo 'HostKey /etc/ssh/vps-box-server' >> /etc/ssh/sshd_config -echo 'Port $SSH_PORT' >> /etc/ssh/sshd_config -systemctl restart sshd - -# SSH logs on /var/log/auth.log |