A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.
fix: improve run script (#4609)
Tobiasd084dfb4705f
diff --git a/scripts/run.sh b/scripts/run.shindex 9fc481fdd..f1220d9eb 100644--- a/scripts/run.sh+++ b/scripts/run.sh@@ -1,10 +1,12 @@+#!/usr/bin/env bash+# Create sub directories in volumemkdir -p /appdata/dbmkdir -p /appdata/redismkdir -p /appdata/trusted-certificates# Run migrations-if [ $DB_MIGRATIONS_DISABLED = "true" ]; then+if [ "$DB_MIGRATIONS_DISABLED" = "true" ]; thenecho "DB migrations are disabled, skipping"elseecho "Running DB migrations"@@ -20,13 +22,15 @@ export CRON_JOB_API_KEY=$(openssl rand -base64 32)# 1. Replace the HOSTNAME in the nginx template file# 2. Create the nginx configuration file from the template# 3. Start the nginx server+export HOSTNAMEenvsubst '${HOSTNAME}' < /etc/nginx/templates/nginx.conf > /etc/nginx/nginx.conf# Start services in the background and store their PIDsnginx -g 'daemon off;' &NGINX_PID=$!-if [ $REDIS_IS_EXTERNAL = "true" ]; then+if [ "$REDIS_IS_EXTERNAL" = "true" ]; thenecho "Using external Redis server at redis://$REDIS_HOST:$REDIS_PORT"+ REDIS_PID=""elseecho "Starting internal Redis server"redis-server /app/redis.conf &@@ -49,9 +53,11 @@ terminate() {echo "Received SIGTERM. Shutting down..."kill -TERM $NGINX_PID $TASKS_PID $WSS_PID $NEXTJS_PID 2>/dev/nullwait- # kill redis-server last because of logging of other services- kill -TERM $REDIS_PID 2>/dev/null- wait+ # kill redis-server last because of logging of other services and only if $REDIS_PID is set+ if [ -n "$REDIS_PID" ]; then+ kill -TERM $REDIS_PID 2>/dev/null+ wait+ fiecho "Shutdown complete."exit 0}@@ -61,4 +67,4 @@ trap terminate TERM INT# Wait for all processeswait $NEXTJS_PID-terminate\ No newline at end of file+terminate