feat: add directory checks for log and config directories in rebuild script
This commit is contained in:
@@ -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."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user