From 7b8ce6a65830388be18b5fd8b6019588004e8db3 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 17 May 2025 19:47:20 +1200 Subject: [PATCH] Tidy --- {example-nginx => static-website}/README.txt | 0 {example-nginx => static-website}/_default.env | 0 {example-nginx => static-website}/backup.sh | 0 {example-nginx => static-website}/config/.template_info.env | 0 {example-nginx => static-website}/config/service.env | 0 {example-nginx => static-website}/install.sh | 5 +++++ {example-nginx => static-website}/logs.sh | 0 {example-nginx => static-website}/nuke.sh | 0 {example-nginx => static-website}/ports.sh | 0 {example-nginx => static-website}/restore.sh | 0 {example-nginx => static-website}/start.sh | 0 {example-nginx => static-website}/status.sh | 0 {example-nginx => static-website}/stop.sh | 0 {example-nginx => static-website}/uninstall.sh | 0 test_template.sh | 2 +- 15 files changed, 6 insertions(+), 1 deletion(-) rename {example-nginx => static-website}/README.txt (100%) rename {example-nginx => static-website}/_default.env (100%) rename {example-nginx => static-website}/backup.sh (100%) rename {example-nginx => static-website}/config/.template_info.env (100%) rename {example-nginx => static-website}/config/service.env (100%) rename {example-nginx => static-website}/install.sh (80%) rename {example-nginx => static-website}/logs.sh (100%) rename {example-nginx => static-website}/nuke.sh (100%) rename {example-nginx => static-website}/ports.sh (100%) rename {example-nginx => static-website}/restore.sh (100%) rename {example-nginx => static-website}/start.sh (100%) rename {example-nginx => static-website}/status.sh (100%) rename {example-nginx => static-website}/stop.sh (100%) rename {example-nginx => static-website}/uninstall.sh (100%) diff --git a/example-nginx/README.txt b/static-website/README.txt similarity index 100% rename from example-nginx/README.txt rename to static-website/README.txt diff --git a/example-nginx/_default.env b/static-website/_default.env similarity index 100% rename from example-nginx/_default.env rename to static-website/_default.env diff --git a/example-nginx/backup.sh b/static-website/backup.sh similarity index 100% rename from example-nginx/backup.sh rename to static-website/backup.sh diff --git a/example-nginx/config/.template_info.env b/static-website/config/.template_info.env similarity index 100% rename from example-nginx/config/.template_info.env rename to static-website/config/.template_info.env diff --git a/example-nginx/config/service.env b/static-website/config/service.env similarity index 100% rename from example-nginx/config/service.env rename to static-website/config/service.env diff --git a/example-nginx/install.sh b/static-website/install.sh similarity index 80% rename from example-nginx/install.sh rename to static-website/install.sh index 1ed6961..571c384 100755 --- a/example-nginx/install.sh +++ b/static-website/install.sh @@ -7,6 +7,11 @@ _check_required_env_vars "LOCAL_DATA_FOLDER" "IMAGE_REGISTRY" "IMAGE_REPO" "IMAG # Ensure local data folder exists datacreate "path=${LOCAL_DATA_FOLDER}" +if [ -z "$( ls -A "${LOCAL_DATA_FOLDER}" )" ]; then + echo "Creating default index.html file..." + echo "

Hello, World, this is ${CONTAINER_NAME}!

" > "${LOCAL_DATA_FOLDER}/index.html" +fi + echo "Checking Docker installation..." _check_docker_installed || _die "Docker test failed, aborting installation..." diff --git a/example-nginx/logs.sh b/static-website/logs.sh similarity index 100% rename from example-nginx/logs.sh rename to static-website/logs.sh diff --git a/example-nginx/nuke.sh b/static-website/nuke.sh similarity index 100% rename from example-nginx/nuke.sh rename to static-website/nuke.sh diff --git a/example-nginx/ports.sh b/static-website/ports.sh similarity index 100% rename from example-nginx/ports.sh rename to static-website/ports.sh diff --git a/example-nginx/restore.sh b/static-website/restore.sh similarity index 100% rename from example-nginx/restore.sh rename to static-website/restore.sh diff --git a/example-nginx/start.sh b/static-website/start.sh similarity index 100% rename from example-nginx/start.sh rename to static-website/start.sh diff --git a/example-nginx/status.sh b/static-website/status.sh similarity index 100% rename from example-nginx/status.sh rename to static-website/status.sh diff --git a/example-nginx/stop.sh b/static-website/stop.sh similarity index 100% rename from example-nginx/stop.sh rename to static-website/stop.sh diff --git a/example-nginx/uninstall.sh b/static-website/uninstall.sh similarity index 100% rename from example-nginx/uninstall.sh rename to static-website/uninstall.sh diff --git a/test_template.sh b/test_template.sh index a760952..d0c4623 100755 --- a/test_template.sh +++ b/test_template.sh @@ -56,7 +56,7 @@ title "Checking template $TEMPLATE" SERVICE_NAME="test-$TEMPLATE" title "Nuking old service" -ds fullnuke localhost $SERVICE_NAME || die "Failed to fullnuke old service" +ds nuke localhost $SERVICE_NAME || die "Failed to fullnuke old service" title "Creating service" ds create-service localhost $TEMPLATE $SERVICE_NAME || die "Failed to create service"