File size: 502 Bytes
dc5f63f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
# Survival: Ensure data directory structure exists
# This prevents FileNotFound crashes during cold starts

DATA_DIR="/data"
BACKUP_DIR="/data/logs"

echo "[Survival] Checking environment..."

if [ ! -d "$DATA_DIR" ]; then
    echo "[Survival] Creating missing data directory: $DATA_DIR"
    mkdir -p "$DATA_DIR"
fi

if [ ! -d "$BACKUP_DIR" ]; then
    echo "[Survival] Creating backup directory: $BACKUP_DIR"
    mkdir -p "$BACKUP_DIR"
fi

echo "[Survival] Environment structure verified."