feat: add directory checks for log and config directories in rebuild script

This commit is contained in:
2026-07-08 12:14:47 -04:00
parent dce22a558f
commit d6cd89ecd0
+18
View File
@@ -21,6 +21,10 @@ SOLUTION_FILE="Jellyfin.sln"
# Publish directory # Publish directory
PUBLISH_DIR="/opt/jellyfin" PUBLISH_DIR="/opt/jellyfin"
# Log and config directories
LOG_DIR="/var/log/jellyfin"
CONFIG_DIR="/etc/jellyfin"
# --- Script --- # --- Script ---
echo "Logging in to Gitea and fetching latest changes..." echo "Logging in to Gitea and fetching latest changes..."
@@ -43,3 +47,17 @@ dotnet publish "$SOLUTION_FILE" --configuration Release --no-build --output "$PU
echo "Project built and published successfully to the '$PUBLISH_DIR' directory." echo "Project built and published successfully to the '$PUBLISH_DIR' directory."
echo "Checking for required directories..."
if [ ! -d "$LOG_DIR" ]; then
echo "Creating log directory: $LOG_DIR"
mkdir -p "$LOG_DIR"
fi
if [ ! -d "$CONFIG_DIR" ]; then
echo "Creating config directory: $CONFIG_DIR"
mkdir -p "$CONFIG_DIR"
fi
echo "Directory check complete."