Skip to content

Commit e9bf724

Browse files
committed
fixed sh ref
1 parent 290db2e commit e9bf724

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

filebrowser/main.test.ts

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { describe, expect, it } from "bun:test";
2+
import {
3+
executeScriptInContainer,
4+
runTerraformApply,
5+
runTerraformInit,
6+
testRequiredVariables,
7+
} from "../test";
8+
9+
describe("azure-region", async () => {
10+
await runTerraformInit(import.meta.dir);
11+
12+
testRequiredVariables(import.meta.dir, {});
13+
14+
});

filebrowser/main.tf

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ terraform {
99
}
1010
}
1111

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

filebrowser/run.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,15 @@ printf "👷 Starting filebrowser in background... \n\n"
1212
ROOT_DIR=${FOLDER}
1313
ROOT_DIR=$${ROOT_DIR/\~/$HOME}
1414

15-
# Set the database flag if DB_PATH is set
1615
DB_FLAG=""
1716
if [ "${DB_PATH}" != "filebrowser.db" ]; then
18-
echo ">>> flag set!"
1917
DB_FLAG="-d ${DB_PATH}"
2018
fi
2119

2220
printf "📂 Serving $${ROOT_DIR} at http://localhost:${PORT} \n\n"
2321

2422
printf "Running 'filebrowser --noauth --root $ROOT_DIR --port ${PORT}$${DB_FLAG}' \n\n" # -d ${DB_PATH}
2523

26-
filebrowser --noauth --root $ROOT_DIR --port ${PORT}${DB_FLAG} >${LOG_PATH} 2>&1 & # -d ${DB_PATH}
24+
filebrowser --noauth --root $ROOT_DIR --port ${PORT}$${DB_FLAG} >${LOG_PATH} 2>&1 & # -d ${DB_PATH}
2725

2826
printf "📝 Logs at ${LOG_PATH} \n\n"

0 commit comments

Comments
 (0)