2022-09-09 18:00:07 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-10-29 15:34:17 +00:00
|
|
|
set -e
|
2022-09-09 18:00:07 +00:00
|
|
|
|
|
|
|
export NEXTCLOUD_FQDN="$NEXTCLOUD_HOSTNAME.$DOMAIN_NAME"
|
|
|
|
export BTCPAY_FQDN="$BTCPAY_HOSTNAME.$DOMAIN_NAME"
|
|
|
|
export BTCPAY_USER_FQDN="$BTCPAY_HOSTNAME_IN_CERT.$DOMAIN_NAME"
|
|
|
|
export WWW_FQDN="$WWW_HOSTNAME.$DOMAIN_NAME"
|
|
|
|
export GITEA_FQDN="$GITEA_HOSTNAME.$DOMAIN_NAME"
|
|
|
|
export NOSTR_FQDN="$NOSTR_HOSTNAME.$DOMAIN_NAME"
|
|
|
|
export ADMIN_ACCOUNT_USERNAME="info"
|
|
|
|
export CERTIFICATE_EMAIL_ADDRESS="$ADMIN_ACCOUNT_USERNAME@$DOMAIN_NAME"
|
|
|
|
export REMOTE_NEXTCLOUD_PATH="$REMOTE_HOME/nextcloud"
|
|
|
|
export REMOTE_GITEA_PATH="$REMOTE_HOME/gitea"
|
|
|
|
export BTC_CHAIN="$BTC_CHAIN"
|
|
|
|
export BTCPAY_ADDITIONAL_HOSTNAMES="$BTCPAY_ADDITIONAL_HOSTNAMES"
|
2022-09-28 17:59:01 +00:00
|
|
|
|
|
|
|
BACKUP_TIMESTAMP="$(date +"%Y-%m")"
|
|
|
|
UNIX_BACKUP_TIMESTAMP="$(date +%s)"
|
|
|
|
|
2022-10-19 17:15:38 +00:00
|
|
|
SHASUM_OF_DOMAIN="$(echo -n "$DOMAIN_NAME" | sha256sum | awk '{print $1;}' )"
|
|
|
|
export DOMAIN_IDENTIFIER="${SHASUM_OF_DOMAIN: -6}"
|
|
|
|
echo "$DOMAIN_IDENTIFIER" > "$SITE_PATH/domain_id"
|
2022-09-28 17:59:01 +00:00
|
|
|
|
|
|
|
export BACKUP_TIMESTAMP="$BACKUP_TIMESTAMP"
|
|
|
|
export UNIX_BACKUP_TIMESTAMP="$UNIX_BACKUP_TIMESTAMP"
|
2022-10-08 16:44:46 +00:00
|
|
|
|
2022-10-19 17:15:38 +00:00
|
|
|
export LANGUAGE_CODE_COUNT=$(("$(echo "$SITE_LANGUAGE_CODES" | tr -cd , | wc -c)"+1))
|
2022-10-22 00:04:03 +00:00
|
|
|
|
|
|
|
STACK_NAME="$DOMAIN_IDENTIFIER-en"
|
|
|
|
export NEXTCLOUD_STACK_TAG="nextcloud-$STACK_NAME"
|
|
|
|
export NEXTCLOUD_DB_STACK_TAG="nextclouddb-$STACK_NAME"
|