Update Jellyfin_Fix_and_Scan.sh

Added db replacement and permissions fix example
This commit is contained in:
Clarth 2024-02-15 11:10:14 -05:00
parent e8981d96b2
commit ef9ace1040
1 changed files with 4 additions and 2 deletions

View File

@ -16,7 +16,9 @@ if [ -n "$error_found_1" ] || [ -n "$error_found_2" ]; then
echo "Error found in journal, deleting database file..."
rm -f /var/lib/jellyfin/data/library.db
# Optionally, replace with a backup and set correct permissions here.
echo "Database file deleted."
cp "/path/to/backups/Jellyfin/library.db" "/var/lib/jellyfin/data/library.db"
/usr/bin/chown jellyfin:jellyfin "/var/lib/jellyfin/data/library.db"
echo "Database file replaced with backup."
# Trigger library scan
echo "Triggering library scan..."
@ -32,4 +34,4 @@ if [ -n "$error_found_1" ] || [ -n "$error_found_2" ]; then
else
echo "No error found in journal."
fi
exit 0
exit 0