From 63c96bd9101475deae0cfb4a887cb142a6b0beb7 Mon Sep 17 00:00:00 2001 From: ChuckPa Date: Mon, 2 Mar 2026 23:23:02 -0500 Subject: [PATCH] v1.15.0 1. Fix long-standing DSM 6 start/stop problem 2. Begin work on addressing edge ownership/perms problems on Synology. May help others as well. --- DBRepair.sh | 30 +++++++++++++++++++++++++----- ReleaseNotes | 9 +++++++++ 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/DBRepair.sh b/DBRepair.sh index 3ea0122..2aca8a8 100755 --- a/DBRepair.sh +++ b/DBRepair.sh @@ -2,12 +2,12 @@ ######################################################################### # Database Repair Utility for Plex Media Server. # # Maintainer: ChuckPa # -# Version: v1.14.00 # -# Date: 24-Jan-2026 # +# Version: v1.15.00 # +# Date: 02-Mar-2026 # ######################################################################### # Version for display purposes -Version="v1.14.00" +Version="v1.15.00" # Have the databases passed integrity checks CheckedDB=0 @@ -29,6 +29,10 @@ RemoveDuplicates=0 # Keep track of how many times the user's hit enter with no command (implied EOF) NullCommands=0 +# Default (Preset) user and group for certain environments +DefaultUser="" +DefaultGroup="" + # Default TMP dir for most hosts TMPDIR="/tmp" SYSTMP="/tmp" @@ -487,6 +491,11 @@ HostConfig() { if [ -d /var/packages/PlexMediaServer ] && \ [ -d "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server" ]; then + # Who are we + DefaultUser="PlexMediaServer" + DefaultGroup="PlexMediaServer" + Owner="${DefaultUser}:${DefaultGroup}" + # Where is the software PKGDIR="/var/packages/PlexMediaServer/target" PLEX_SQLITE="$PKGDIR/Plex SQLite" @@ -514,6 +523,11 @@ HostConfig() { elif [ -d "/var/packages/Plex Media Server" ] && \ [ -f "/usr/syno/sbin/synoshare" ]; then + # Who are we + DefaultUser="Plex" + DefaultGroup="users" + Owner="${DefaultUser}:${DefaultGroup}" + # Where is the software PKGDIR="/var/packages/Plex Media Server/target" PLEX_SQLITE="$PKGDIR/Plex SQLite" @@ -537,8 +551,14 @@ HostConfig() { # We do have start/stop as root HaveStartStop=1 - StartCommand="/usr/syno/bin/synopkg start PlexMediaServer" - StopCommand="/usr/syno/bin/synopkg stop PlexMediaServer" + SynoStart="'/var/packages/Plex Media Server/scripts/start-stop-status' start" + SynoStop="'/var/packages/Plex Media Server/scripts/start-stop-status' stop" + + # We do have start/stop as root + HaveStartStop=1 + StartCommand="eval $SynoStart" + StopCommand="eval $SynoStop" + return 0 fi diff --git a/ReleaseNotes b/ReleaseNotes index aa3cd14..7c9c847 100644 --- a/ReleaseNotes +++ b/ReleaseNotes @@ -8,6 +8,15 @@ ![Maintenance](https://img.shields.io/badge/Maintained-Yes-green.svg) # Release Info: +v1.15.00 + + 1. DSM 6 Start/Stop - Change how DSM 6 start/stop feature implemented + This accounts for changes in DSM 6. + + 2. Permissions/Owner - Some DSM users experience permission errors after running DBRepair + on Synology. Begin implementation of more robust handling for + restricted environments like DSM. + v1.14.00 1. Full-Text Search - Check and repair Full-Text Search (FTS) database indexes.