diff --git a/.env.template b/.env.template index 514a590..162e9c8 100644 --- a/.env.template +++ b/.env.template @@ -3,8 +3,6 @@ export AWS_ACCOUNT= export AWS_PROFILE= export AWS_REGION= export AWS__EFS__LOCAL_MOUNT_POINT= -export AWS__S3__MEDIA_BUCKET= -export AWS__S3__MEDIA_TARGETS= export DIRECTUS__API_TOKEN= export DIRECTUS__BASE_URL= export DISCORD__BOT_TOKEN= @@ -15,6 +13,8 @@ export I3__DMENU_FONT_SIZE= export I3__GLOBAL_FONT_SIZE= export I3__MODEL_CONFIG= export LINEAR__API_TOKEN= +export MEDIA_SYNC__S3_BUCKET +export MEDIA_SYNC__TARGETS export REDIS_AUTH= export REDIS_HOST= export REDIS_PORT= diff --git a/.env.template.descriptions b/.env.template.descriptions index d80d498..94cee42 100644 --- a/.env.template.descriptions +++ b/.env.template.descriptions @@ -4,9 +4,6 @@ AWS_REGION | AWS__EFS__LOCAL_MOUNT_POINT | fully-qualified path to mount the EFS drive -AWS__S3__MEDIA_BUCKET | s3 bucket name and filesystem targets for media backups -AWS__S3__MEDIA_TARGETS | - DIRECTUS__API_TOKEN | details for a directus instance DIRECTUS__BASE_URL | @@ -21,6 +18,9 @@ I3__MODEL_CONFIG | LINEAR__API_TOKEN | linear.app project management configuration +MEDIA_SYNC__S3_BUCKET | s3 bucket name and filesystem targets for media backups +MEDIA_SYNC__TARGETS | + REDIS_AUTH | redis connection credentials REDIS_HOST | REDIS_PORT | diff --git a/run b/run index 5eccf9e..9c0e59d 100755 --- a/run +++ b/run @@ -217,6 +217,11 @@ __RUN() { export ENV_NAME } + for f in $(eval 'echo $SCWRYPTS_STATIC_CONFIG__'$SCWRYPT_GROUP) + do + source "$f" || FAIL 5 "invalid static config '$f'" + done + ########################################## [ ! $SUBSCWRYPT ] \ diff --git a/zsh/scwrypts/environment/synchronize b/zsh/scwrypts/environment/synchronize index 98ff59f..63b3088 100755 --- a/zsh/scwrypts/environment/synchronize +++ b/zsh/scwrypts/environment/synchronize @@ -119,7 +119,7 @@ ADD_LINES() { do VARIABLE=$(echo $LINE | sed 's/=.*$//') echo $CONTENT | grep -qi "^$VARIABLE" || { - echo $LINE | grep -qi '__[a-z_]\+=' || { + echo $LINE | grep -q '__[a-z_]\+=' || { WARNING "skipping variable $(echo $LINE | sed 's/^export //; s/=.*//') (must be included in a template before it can be added)" continue @@ -142,6 +142,7 @@ READ_POPULATED_VARIABLES() { | awk '/^[^=]+$/{printf "%s_____",$0;next}7' \ | sed 's/\(_____\)\(export\)/\1\n\2/; s/\(_____\)$/\1\n/' \ | sed 's/^.*_____.*$/_____&/' \ + | sed 's/^_____export/export/' \ | sed -z 's/[\n ] *_____/_____/g' \ | grep -v '^$' \ ;