add directory structure for /storage/*
Some checks failed
CI / test-build (push) Has been cancelled

This commit is contained in:
2025-12-18 12:16:00 +07:00
parent 945217c536
commit 0e26ed99bc
2 changed files with 69 additions and 0 deletions

View File

@@ -524,11 +524,17 @@ create_directories() {
mkdir -p "$BACKUP_DIR"
mkdir -p "$CONFIG_DIR/tls"
# Create dedicated storage directories for ZFS pools, datasets, and shares
mkdir -p "/storage/pools"
mkdir -p "/storage/datasets"
mkdir -p "/storage/shares"
# Set ownership
chown -R "$SERVICE_USER:$SERVICE_USER" "$DATA_DIR"
chown -R "$SERVICE_USER:$SERVICE_USER" "$LOG_DIR"
chown -R "$SERVICE_USER:$SERVICE_USER" "$BACKUP_DIR"
chown -R "$SERVICE_USER:$SERVICE_USER" "$CONFIG_DIR"
chown -R "$SERVICE_USER:$SERVICE_USER" "/storage"
# Set permissions
chmod 755 "$INSTALL_DIR"
@@ -537,8 +543,13 @@ create_directories() {
chmod 700 "$CONFIG_DIR"
chmod 750 "$LOG_DIR"
chmod 750 "$BACKUP_DIR"
chmod 755 "/storage"
chmod 755 "/storage/pools"
chmod 755 "/storage/datasets"
chmod 755 "/storage/shares"
echo -e "${GREEN}Directories created${NC}"
echo " Storage directories: /storage/{pools,datasets,shares}"
}
# Build binaries