11 lines
424 B
Bash
Executable File
11 lines
424 B
Bash
Executable File
#!/bin/sh
|
|
|
|
FILENAME=$(ls -1t /mnt/media/plexsync/plexdb* | head -1)
|
|
|
|
if sqlite3 /config/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db ".restore $FILENAME"; then
|
|
chown 1001:1001 "$FILENAME"
|
|
echo "$(date)"": preStart lifecycle restore of Plex database was successful."
|
|
else
|
|
echo "$(date)"": preStart lifecycle restore of Plex database has failed."
|
|
fi
|