fixed sh ref

pull/78/head
Stephen Kirby 2 years ago
parent 290db2ea33
commit e9bf7245bb

@ -0,0 +1,14 @@
import { describe, expect, it } from "bun:test";
import {
executeScriptInContainer,
runTerraformApply,
runTerraformInit,
testRequiredVariables,
} from "../test";
describe("azure-region", async () => {
await runTerraformInit(import.meta.dir);
testRequiredVariables(import.meta.dir, {});
});

@ -9,7 +9,6 @@ terraform {
}
}
# Add required variables for your modules and remove any unneeded variables
variable "agent_id" {
type = string
description = "The ID of a Coder agent."
@ -20,7 +19,7 @@ variable "database_path" {
description = "The path to the filebrowser database."
default = "filebrowser.db"
validation {
# condition = endswith(var.database_path, "filebrowser.db")
# Ensures path leads to */filebrowser.db
condition = can(regex(".*filebrowser\\.db$", var.database_path))
error_message = "The database_path must end with 'filebrowser.db'."
}

@ -12,10 +12,8 @@ printf "👷 Starting filebrowser in background... \n\n"
ROOT_DIR=${FOLDER}
ROOT_DIR=$${ROOT_DIR/\~/$HOME}
# Set the database flag if DB_PATH is set
DB_FLAG=""
if [ "${DB_PATH}" != "filebrowser.db" ]; then
echo ">>> flag set!"
DB_FLAG="-d ${DB_PATH}"
fi
@ -23,6 +21,6 @@ printf "📂 Serving $${ROOT_DIR} at http://localhost:${PORT} \n\n"
printf "Running 'filebrowser --noauth --root $ROOT_DIR --port ${PORT}$${DB_FLAG}' \n\n" # -d ${DB_PATH}
filebrowser --noauth --root $ROOT_DIR --port ${PORT}${DB_FLAG} >${LOG_PATH} 2>&1 & # -d ${DB_PATH}
filebrowser --noauth --root $ROOT_DIR --port ${PORT}$${DB_FLAG} >${LOG_PATH} 2>&1 & # -d ${DB_PATH}
printf "📝 Logs at ${LOG_PATH} \n\n"

Loading…
Cancel
Save