Suppress error messages and timing.

This commit is contained in:
Derek Smith 2022-10-29 11:34:17 -04:00
parent 257034761d
commit 3616c9aecb
Signed by: farscapian
GPG Key ID: 8F1CD799CCA516CC
27 changed files with 31 additions and 35 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -eux set -eu
cd "$(dirname "$0")" cd "$(dirname "$0")"
# This script is meant to be executed on the management machine. # This script is meant to be executed on the management machine.

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -eux set -eu
cd "$(dirname "$0")" cd "$(dirname "$0")"
check_dependencies () { check_dependencies () {

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -ex set -e
cd "$(dirname "$0")" cd "$(dirname "$0")"
# take the services down, create a backup archive, then pull it down. # take the services down, create a backup archive, then pull it down.

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -eux set -eu
cd "$(dirname "$0")" cd "$(dirname "$0")"
export DOCKER_HOST="ssh://ubuntu@$BTCPAY_FQDN" export DOCKER_HOST="ssh://ubuntu@$BTCPAY_FQDN"

View File

@ -1,6 +1,6 @@
#!/bin/bash -e #!/bin/bash -e
set -o pipefail -o errexit -x set -o pipefail -o errexit
# Please be aware of these important issues: # Please be aware of these important issues:
# #

View File

@ -1,6 +1,6 @@
#!/bin/bash -e #!/bin/bash -e
set -o pipefail -o errexit -x set -o pipefail -o errexit
if [ "$(id -u)" != "0" ]; then if [ "$(id -u)" != "0" ]; then
echo "ERROR: This script must be run as root." echo "ERROR: This script must be run as root."

View File

@ -1,10 +1,8 @@
#!/bin/bash #!/bin/bash
set -ex set -e
cd "$(dirname "$0")" cd "$(dirname "$0")"
echo "ENTERING RESTORE SCRIPT."
if [ -f "$BTCPAY_RESTORE_ARCHIVE_PATH" ]; then if [ -f "$BTCPAY_RESTORE_ARCHIVE_PATH" ]; then
# push the restoration archive to the remote server # push the restoration archive to the remote server
echo "INFO: Restoring BTCPAY Server: $BTCPAY_RESTORE_ARCHIVE_PATH" echo "INFO: Restoring BTCPAY Server: $BTCPAY_RESTORE_ARCHIVE_PATH"
@ -29,5 +27,3 @@ else
echo "ERROR: File does not exist." echo "ERROR: File does not exist."
exit 1 exit 1
fi fi
echo "EXITING RESTORE script."

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -ex set -e
cd "$(dirname "$0")" cd "$(dirname "$0")"
# export BTCPAY_FASTSYNC_ARCHIVE_FILENAME="utxo-snapshot-bitcoin-testnet-1445586.tar" # export BTCPAY_FASTSYNC_ARCHIVE_FILENAME="utxo-snapshot-bitcoin-testnet-1445586.tar"
@ -11,7 +11,7 @@ cd "$(dirname "$0")"
cat > "$SITE_PATH/btcpay.sh" <<EOL cat > "$SITE_PATH/btcpay.sh" <<EOL
#!/bin/bash #!/bin/bash
set -ex set -e
cd "\$(dirname "\$0")" cd "\$(dirname "\$0")"
# wait for cloud-init to complete yo # wait for cloud-init to complete yo

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -exu set -eu
cd "$(dirname "$0")" cd "$(dirname "$0")"
./stub_lxc_profile.sh sovereign-stack ./stub_lxc_profile.sh sovereign-stack

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -eux set -eu
cd "$(dirname "$0")" cd "$(dirname "$0")"
# let's make sure we have an ssh keypair. We just use $SSH_HOME/id_rsa # let's make sure we have an ssh keypair. We just use $SSH_HOME/id_rsa

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -eux set -eu
cd "$(dirname "$0")" cd "$(dirname "$0")"
./stub_lxc_profile.sh "$LXD_VM_NAME" ./stub_lxc_profile.sh "$LXD_VM_NAME"

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -eux set -eu
cd "$(dirname "$0")" cd "$(dirname "$0")"
if [ ! -f "$HOME/.aws/credentials" ]; then if [ ! -f "$HOME/.aws/credentials" ]; then

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -eux set -eu
DDNS_STRING= DDNS_STRING=

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -eux set -eu
LXD_HOSTNAME="$1" LXD_HOSTNAME="$1"

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -ex set -e
LXC_INSTANCE_NAME="$1" LXC_INSTANCE_NAME="$1"
IP_V4_ADDRESS= IP_V4_ADDRESS=

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -eux set -eu
cd "$(dirname "$0")" cd "$(dirname "$0")"
# TODO: We are using extra space on the remote VPS at the moment for the duplicity backup files. # TODO: We are using extra space on the remote VPS at the moment for the duplicity backup files.

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -ex set -e
# let's do a refresh of the certificates. Let's Encrypt will not run if it's not time. # let's do a refresh of the certificates. Let's Encrypt will not run if it's not time.

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -exu set -eu
cd "$(dirname "$0")" cd "$(dirname "$0")"
# Create the nginx config file which covers all domains. # Create the nginx config file which covers all domains.

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -eux set -eu
cd "$(dirname "$0")" cd "$(dirname "$0")"
FILE_COUNT="$(find "$LOCAL_BACKUP_PATH" -type f | wc -l)" FILE_COUNT="$(find "$LOCAL_BACKUP_PATH" -type f | wc -l)"

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -exu set -eu
cd "$(dirname "$0")" cd "$(dirname "$0")"
# bring down ghost instances. # bring down ghost instances.
@ -59,9 +59,11 @@ if docker stack list --format "{{.Name}}" | grep -q reverse-proxy; then
# wait for all docker containers to stop. # wait for all docker containers to stop.
# TODO see if there's a way to check for this. # TODO see if there's a way to check for this.
sleep 10 sleep 7
docker system prune -f docker system prune -f
sleep 2
fi fi
# generate the certs and grab a backup # generate the certs and grab a backup

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -exu set -eu
cd "$(dirname "$0")" cd "$(dirname "$0")"
for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -exu set -eu
cd "$(dirname "$0")" cd "$(dirname "$0")"
for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do

View File

@ -1,10 +1,8 @@
#!/bin/bash #!/bin/bash
set -exu set -eu
cd "$(dirname "$0")" cd "$(dirname "$0")"
for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
export DOMAIN_NAME="$DOMAIN_NAME" export DOMAIN_NAME="$DOMAIN_NAME"
export SITE_PATH="$SITES_PATH/$DOMAIN_NAME" export SITE_PATH="$SITES_PATH/$DOMAIN_NAME"

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -euox set -eu
cd "$(dirname "$0")" cd "$(dirname "$0")"
#https://github.com/fiatjaf/expensive-relay #https://github.com/fiatjaf/expensive-relay

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -ex set -e
# TODO, ensure VPS_HOSTING_TARGET is in range. # TODO, ensure VPS_HOSTING_TARGET is in range.
export NEXTCLOUD_FQDN="$NEXTCLOUD_HOSTNAME.$DOMAIN_NAME" export NEXTCLOUD_FQDN="$NEXTCLOUD_HOSTNAME.$DOMAIN_NAME"

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -ex set -e
cd "$(dirname "$0")" cd "$(dirname "$0")"
# let's check to ensure the management machine is on the Baseline ubuntu 21.04 # let's check to ensure the management machine is on the Baseline ubuntu 21.04

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -x set -e
SSH_ENDPOINT_HOSTNAME="atlantis" SSH_ENDPOINT_HOSTNAME="atlantis"
SSH_ENDPOINT_DOMAIN_NAME="ancapistan.io" SSH_ENDPOINT_DOMAIN_NAME="ancapistan.io"