diff --git a/env b/env deleted file mode 100755 index f689726..0000000 --- a/env +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -########### -# ###### -export DEV_MEMORY_MB="4096" -export DEV_CPU_COUNT="4" -export DEV_WWW_MAC_ADDRESS="00:16:3E:AD:25:2C" -export DEV_BTCPAY_MAC_ADDRESS="00:16:3E:AD:25:2D" - -LXD_DISK_TO_USE= - -if [ "$(lxc remote get-default)" = "antsle" ]; then - DEV_MACVLAN_INTERFACE="eno3" - LXD_DISK_TO_USE="/dev/sda" -elif [ "$(lxc remote get-default)" = "local" ]; then - DEV_MACVLAN_INTERFACE="enp5s0" -fi - -export DEV_MACVLAN_INTERFACE="$DEV_MACVLAN_INTERFACE" -export DEV_WWW_MAC_ADDRESS="$DEV_WWW_MAC_ADDRESS" -export DEV_BTCPAY_MAC_ADDRESS="$DEV_BTCPAY_MAC_ADDRESS" -export LXD_DISK_TO_USE="$LXD_DISK_TO_USE" -###### \ No newline at end of file diff --git a/git b/git new file mode 120000 index 0000000..0899c29 --- /dev/null +++ b/git @@ -0,0 +1 @@ +git \ No newline at end of file diff --git a/go_www.sh b/go_www.sh index aae080e..1355984 100755 --- a/go_www.sh +++ b/go_www.sh @@ -131,6 +131,6 @@ if [ "$RUN_SERVICES" = true ]; then fi if [ "$DEPLOY_GITEA" = true ]; then - xdg-open "http://$GITTEA_FQDN" + xdg-open "http://$GITEA_FQDN" fi -fi \ No newline at end of file +fi diff --git a/provision_lxc.sh b/provision_lxc.sh index 0fade87..fa95220 100755 --- a/provision_lxc.sh +++ b/provision_lxc.sh @@ -80,7 +80,7 @@ if ! lxc image list --format csv "$VM_NAME" | grep -q "$VM_NAME"; then fi lxc init \ - --profile="sovereign-stack" \ + --profile="$LXD_VM_NAME" \ "ubuntu-21-04" \ "$VM_NAME" --vm @@ -110,7 +110,7 @@ if ! lxc image list --format csv "$VM_NAME" | grep -q "$VM_NAME"; then fi # now let's create a new VM to work with. -lxc init --profile="sovereign-stack" "$VM_NAME" "$LXD_VM_NAME" --vm +lxc init --profile="$LXD_VM_NAME" "$VM_NAME" "$LXD_VM_NAME" --vm # let's PIN the HW address for now so we don't exhaust IP # and so we can set DNS internally. diff --git a/publish_tag.sh b/publish_tag.sh index 54de3c3..c4ef1be 100755 --- a/publish_tag.sh +++ b/publish_tag.sh @@ -1,7 +1,7 @@ #!/bin/bash # this script will tag the repo then push it to origin -TAG_NAME=v0.0.14 +TAG_NAME=v0.0.18 COMIT_MESSAGE="Creating commit on $(date)." TAG_MESSAGE="Creating tag $TAG_NAME on $(date)." diff --git a/refresh.sh b/refresh.sh index 8d1af4b..a4b6a15 100755 --- a/refresh.sh +++ b/refresh.sh @@ -3,11 +3,6 @@ set -exuo nounset cd "$(dirname "$0")" -# the user can specify an env which sets some environment variables. See the default content of env. -if [ -f "$(pwd)/env" ]; then - source "$(pwd)/env" -fi - USER_DELETE_MACHINE=false DOMAIN_NAME= VPS_HOSTING_TARGET=lxd @@ -19,6 +14,8 @@ UPDATE_BTCPAY=false MIGRATE_BTCPAY_SERVER=false RECONFIGURE_BTCPAY_SERVER=false BTCPAY_ADDITIONAL_HOSTNAMES= +LXD_DISK_TO_USE= +DEV_BTCPAY_MAC_ADDRESS= for i in "$@"; do case $i in @@ -75,6 +72,7 @@ done export DOMAIN_NAME="$DOMAIN_NAME" export VPS_HOSTING_TARGET="$VPS_HOSTING_TARGET" export LXD_DISK_TO_USE="$LXD_DISK_TO_USE" +export DEV_BTCPAY_MAC_ADDRESS="$DEV_BTCPAY_MAC_ADDRESS" export RUN_CERT_RENEWAL="$RUN_CERT_RENEWAL" export BTC_CHAIN="$BTC_CHAIN" diff --git a/shared.sh b/shared.sh index 2d26ed7..24b251d 100755 --- a/shared.sh +++ b/shared.sh @@ -132,38 +132,51 @@ export WWW_INSTANCE_TYPE="$WWW_INSTANCE_TYPE" export REMOTE_BACKUP_PATH="$REMOTE_BACKUP_PATH" export BTCPAY_ADDITIONAL_HOSTNAMES="$BTCPAY_ADDITIONAL_HOSTNAMES" -if [ -z "$GHOST_MYSQL_PASSWORD" ]; then - echo "ERROR: Ensure GHOST_MYSQL_PASSWORD is configured in your site_definition." - exit 1 +if [ "$DEPLOY_GHOST" = true ]; then + if [ -z "$GHOST_MYSQL_PASSWORD" ]; then + echo "ERROR: Ensure GHOST_MYSQL_PASSWORD is configured in your site_definition." + exit 1 + fi + + if [ -z "$GHOST_MYSQL_ROOT_PASSWORD" ]; then + echo "ERROR: Ensure GHOST_MYSQL_ROOT_PASSWORD is configured in your site_definition." + exit 1 + fi fi -if [ -z "$GHOST_MYSQL_ROOT_PASSWORD" ]; then - echo "ERROR: Ensure GHOST_MYSQL_ROOT_PASSWORD is configured in your site_definition." - exit 1 +if [ "$DEPLOY_GITEA" = true ]; then + if [ -z "$GITEA_MYSQL_PASSWORD" ]; then + echo "ERROR: Ensure GITEA_MYSQL_PASSWORD is configured in your site_definition." + exit 1 + fi + if [ -z "$GITEA_MYSQL_ROOT_PASSWORD" ]; then + echo "ERROR: Ensure GITEA_MYSQL_ROOT_PASSWORD is configured in your site_definition." + exit 1 + fi fi -if [ -z "$NEXTCLOUD_MYSQL_PASSWORD" ]; then - echo "ERROR: Ensure NEXTCLOUD_MYSQL_PASSWORD is configured in your site_definition." - exit 1 +if [ "$DEPLOY_NEXTCLOUD" = true ]; then + if [ -z "$NEXTCLOUD_MYSQL_ROOT_PASSWORD" ]; then + echo "ERROR: Ensure NEXTCLOUD_MYSQL_ROOT_PASSWORD is configured in your site_definition." + exit 1 + fi + + if [ -z "$NEXTCLOUD_MYSQL_PASSWORD" ]; then + echo "ERROR: Ensure NEXTCLOUD_MYSQL_PASSWORD is configured in your site_definition." + exit 1 + fi fi -if [ -z "$GITEA_MYSQL_PASSWORD" ]; then - echo "ERROR: Ensure GITEA_MYSQL_PASSWORD is configured in your site_definition." - exit 1 -fi +if [ "$DEPLOY_MATRIX" = true ]; then + if [ -z "$MATRIX_ADMIN_PASSWORD" ]; then + echo "ERROR: Ensure MATRIX_ADMIN_PASSWORD is configured in your site_definition." + exit 1 + fi -if [ -z "$NEXTCLOUD_MYSQL_ROOT_PASSWORD" ]; then - echo "ERROR: Ensure NEXTCLOUD_MYSQL_ROOT_PASSWORD is configured in your site_definition." - exit 1 -fi - -if [ -z "$GITEA_MYSQL_ROOT_PASSWORD" ]; then - echo "ERROR: Ensure GITEA_MYSQL_ROOT_PASSWORD is configured in your site_definition." - exit 1 -fi -if [ -z "$MATRIX_ADMIN_PASSWORD" ]; then - echo "ERROR: Ensure MATRIX_ADMIN_PASSWORD is configured in your site_definition." - exit 1 + if [ -z "$MATRIX_DB_PASSWORD" ]; then + echo "ERROR: Ensure MATRIX_DB_PASSWORD is configured in your site_definition." + exit 1 + fi fi if [ -z "$DUPLICITY_BACKUP_PASSPHRASE" ]; then @@ -191,11 +204,6 @@ if [ -z "$SITE_TITLE" ]; then exit 1 fi -if [ -z "$MATRIX_DB_PASSWORD" ]; then - echo "ERROR: Ensure MATRIX_DB_PASSWORD is configured in your site_definition." - exit 1 -fi - if [ -z "$DEPLOY_BTCPPAY_SERVER" ]; then echo "ERROR: Ensure DEPLOY_BTCPPAY_SERVER is configured in your site_definition." exit 1