From 9a419ccc6ea8d4eee79bb58ed233f542b595bbdf Mon Sep 17 00:00:00 2001 From: Derek Smith Date: Sat, 7 Jan 2023 09:37:55 -0500 Subject: [PATCH] Deploy nostr relay when -n NOSTR_ACCOUNT_PUBKEY. --- defaults.sh | 2 +- deploy.sh | 1 - deployment/www/generate_certs.sh | 2 +- deployment/www/go.sh | 8 +++----- deployment/www/stub/nginx_config.sh | 6 +++--- deployment/www/stub/nginx_yml.sh | 4 ++-- deployment/www/stub/nostr_yml.sh | 2 +- reset_env.sh | 1 - 8 files changed, 11 insertions(+), 15 deletions(-) diff --git a/defaults.sh b/defaults.sh index 0d8055a..83621d0 100755 --- a/defaults.sh +++ b/defaults.sh @@ -6,7 +6,7 @@ export WWW_SERVER_MAC_ADDRESS= export DEPLOY_WWW_SERVER=false export DEPLOY_BTCPAY_SERVER=false export DEPLOY_GHOST=false -export DEPLOY_NOSTR_RELAY=false + export DEPLOY_ONION_SITE=false export DEPLOY_NEXTCLOUD=false export DEPLOY_GITEA=false diff --git a/deploy.sh b/deploy.sh index 125bc17..f79ebe4 100755 --- a/deploy.sh +++ b/deploy.sh @@ -293,7 +293,6 @@ export SITE_LANGUAGE_CODES="en" export DUPLICITY_BACKUP_PASSPHRASE="$(new_pass)" export DEPLOY_GHOST=true export DEPLOY_NEXTCLOUD=false -export DEPLOY_NOSTR_RELAY=false export NOSTR_ACCOUNT_PUBKEY="NOSTR_IDENTITY_PUBKEY_GOES_HERE" export DEPLOY_GITEA=false #export DEPLOY_ONION_SITE=false diff --git a/deployment/www/generate_certs.sh b/deployment/www/generate_certs.sh index 5268ea9..63fbb13 100755 --- a/deployment/www/generate_certs.sh +++ b/deployment/www/generate_certs.sh @@ -25,7 +25,7 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do DOMAIN_STRING="-d $DOMAIN_NAME -d $WWW_FQDN -d $BTCPAY_USER_FQDN" if [ "$DEPLOY_NEXTCLOUD" = true ]; then DOMAIN_STRING="$DOMAIN_STRING -d $NEXTCLOUD_FQDN"; fi if [ "$DEPLOY_GITEA" = true ]; then DOMAIN_STRING="$DOMAIN_STRING -d $GITEA_FQDN"; fi - if [ "$DEPLOY_NOSTR_RELAY" = true ]; then DOMAIN_STRING="$DOMAIN_STRING -d $NOSTR_FQDN"; fi + if [ -n "$NOSTR_ACCOUNT_PUBKEY" ]; then DOMAIN_STRING="$DOMAIN_STRING -d $NOSTR_FQDN"; fi # if BTCPAY_ALT_NAMES has been set by the admin, iterate over the list # and append the domain names to the certbot request diff --git a/deployment/www/go.sh b/deployment/www/go.sh index 6a57fc4..6becc61 100755 --- a/deployment/www/go.sh +++ b/deployment/www/go.sh @@ -55,11 +55,9 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do fi fi - if [ "$DEPLOY_NOSTR_RELAY" = true ]; then - if [ -z "$NOSTR_ACCOUNT_PUBKEY" ]; then - echo "ERROR: Ensure NOSTR_ACCOUNT_PUBKEY is configured in your site_definition." - exit 1 - fi + if [ -z "$NOSTR_ACCOUNT_PUBKEY" ]; then + echo "ERROR: Ensure NOSTR_ACCOUNT_PUBKEY is configured in your site_definition." + exit 1 fi if [ -z "$DUPLICITY_BACKUP_PASSPHRASE" ]; then diff --git a/deployment/www/stub/nginx_config.sh b/deployment/www/stub/nginx_config.sh index a8bffdc..ff99073 100755 --- a/deployment/www/stub/nginx_config.sh +++ b/deployment/www/stub/nginx_config.sh @@ -191,7 +191,7 @@ EOL EOL - if [ "$DEPLOY_NOSTR_RELAY" = true ]; then + if [ -n "$NOSTR_ACCOUNT_PUBKEY" ]; then cat >>"$NGINX_CONF_PATH" <>"$NGINX_CONF_PATH" <> "$DOCKER_YAML_PATH" <> "$DOCKER_YAML_PATH" <