aboutsummaryrefslogtreecommitdiff
path: root/scripts/box
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/box')
-rwxr-xr-xscripts/box/bash-profile.sh5
-rwxr-xr-xscripts/box/create-backup.env.sh14
-rwxr-xr-xscripts/box/restore-backup.env.sh21
-rwxr-xr-xscripts/box/user-data.env.sh11
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