diff --git a/rebuild-solution.sh b/rebuild-solution.sh index 3125eaee..4dc66767 100644 --- a/rebuild-solution.sh +++ b/rebuild-solution.sh @@ -21,6 +21,10 @@ SOLUTION_FILE="Jellyfin.sln" # Publish directory PUBLISH_DIR="/opt/jellyfin" +# Log and config directories +LOG_DIR="/var/log/jellyfin" +CONFIG_DIR="/etc/jellyfin" + # --- Script --- 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 "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." +