v1.06.01 - Support directory or full path with '--sqlite' option.

This commit is contained in:
ChuckPa 2024-05-10 18:04:06 -04:00
parent 907f233a06
commit 32c30e6826
No known key found for this signature in database
GPG Key ID: 3CE28A0F6BC31B5B
3 changed files with 25 additions and 8 deletions

View File

@ -2,12 +2,12 @@
#########################################################################
# Plex Media Server database check and repair utility script. #
# Maintainer: ChuckPa #
# Version: v1.06.00 #
# Date: 01-May-2024 #
# Version: v1.06.01 #
# Date: 10-May-2024 #
#########################################################################
# Version for display purposes
Version="v1.06.00"
Version="v1.06.01"
# Have the databases passed integrity checks
CheckedDB=0
@ -1661,15 +1661,20 @@ do
[ "$Opt" = "-f" ] && shift
[ "$Opt" = "-p" ] && shift
# Manual configuration options (running outside of container)
# Manual configuration options (running outside of container or unusual hosts)
if [ "$Opt" = "--sqlite" ]; then
# Manually specify path to where Plex SQLite is installed.
# Is this the directory where Plex SQLite exists?
if [ -d "$2" ] && [ -f "$2/Plex SQLite" ]; then
PLEX_SQLITE="$2/Plex SQLite"
ManualConfig=1
# Or is it the direct path to Plex SQLite
elif echo "$2" | grep "Plex SQLite" > /dev/null ; then
PLEX_SQLITE="$2"
else
Output "Given directory path ('$1') for Plex SQLite is invalid. Ignoring."
Output "Given directory/path ('$2') for Plex SQLite is invalid. Ignoring."
fi
shift 2
fi

View File

@ -857,9 +857,13 @@ root@lizum:/sata/plex/Plex Media Server/Plug-in Support/Databases#
Manual configuration is enabled by supplying two command line arguments.
These must precede all other options or commands on the command line.
--sqlite "Directory containing Plex SQLite" (OR) --sqlite "/path/to/Plex SQLite"
Scripted Example:
DBRepair.sh --sqlite /usr/lib/plexmediaserver --databases /real/host/directory/...../Databases auto prune
DBRepair.sh --sqlite /usr/lib/plexmediaserver --databases "/real/host/directory/...../Databases" auto prune
-or-
DBRepair.sh --sqlite "/tmp/plex/Plex SQLite" --databases "/real/host/directory/...../Databases" auto prune
Interactive Example:

View File

@ -8,6 +8,14 @@
![Maintenance](https://img.shields.io/badge/Maintained-Yes-green.svg)
# Release Info:
v1.06.01
1. Manual SQLite path - You many now also specify the full path to "Plex SQLite". ( example: "/tmp/downloads/Plex SQLite")
DBRepair.sh will automatically figure out which form to use (path or directory)
--sqlite "/real/host/path/to/plexmediaserver/Directory"
--sqlite "/real/host/path/to/plexmediaserver/directory/Plex SQLite"
v1.06.00
1. Manual configuration - You may now run DBRepair from outside container environments.