Skip to content

Commit

Permalink
Update run.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
tanfarming authored Aug 11, 2022
1 parent f051574 commit 63d7dcc
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions scripts/docker/run.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@

turkeyCfg_thumbnail_server="${turkeyCfg_thumbnail_server:nearspark.reticulum.io}"
turkeyCfg_base_assets_path="${turkeyCfg_base_assets_path:https://$SUB_DOMAIN-assets.$DOMAIN/hubs/}"
turkeyCfg_non_cors_proxy_domains="${turkeyCfg_non_cors_proxy_domains:$SUB_DOMAIN.$DOMAIN,$SUB_DOMAIN-assets.$DOMAIN}"
turkeyCfg_reticulum_server="${turkeyCfg_reticulum_server:$SUB_DOMAIN.$DOMAIN}"
turkeyCfg_cors_proxy_server="${turkeyCfg_cors_proxy_server:$SUB_DOMAIN-cors.$DOMAIN}"
turkeyCfg_shortlink_domain="${turkeyCfg_shortlink_domain:$SUB_DOMAIN.$DOMAIN}"
#cheatsheet
#if [ -z ${var1+x} ]; then echo "is unset"; else echo " is set to '$var1'"; fi
if [ -z ${turkeyCfg_thumbnail_server+x} ]; then export turkeyCfg_thumbnail_server="nearspark.reticulum.io"; fi
if [ -z ${turkeyCfg_base_assets_path+x} ]; then export turkeyCfg_base_assets_path="https://$SUB_DOMAIN-assets.$DOMAIN/hubs/"; fi
if [ -z ${turkeyCfg_non_cors_proxy_domains+x} ]; then export turkeyCfg_non_cors_proxy_domains="$SUB_DOMAIN.$DOMAIN,$SUB_DOMAIN-assets.$DOMAIN"; fi
if [ -z ${turkeyCfg_reticulum_server+x} ]; then export turkeyCfg_reticulum_server="$SUB_DOMAIN.$DOMAIN"; fi
if [ -z ${turkeyCfg_cors_proxy_server+x} ]; then export turkeyCfg_cors_proxy_server="$SUB_DOMAIN-cors.$DOMAIN"; fi
if [ -z ${turkeyCfg_shortlink_domain+x} ]; then export turkeyCfg_shortlink_domain="$SUB_DOMAIN.$DOMAIN"; fi

find /www/hubs/ -type f -name *.html -exec sed -i "s/{{rawhubs-base-assets-path}}\//https:\/\/${SUB_DOMAIN}-assets.${DOMAIN}\/hubs\//g" {} \;
find /www/hubs/ -type f -name *.html -exec sed -i "s/{{rawhubs-base-assets-path}}/https:\/\/${SUB_DOMAIN}-assets.${DOMAIN}\/hubs\//g" {} \;
Expand Down

0 comments on commit 63d7dcc

Please sign in to comment.