Skip to content

Commit ceae14d

Browse files
authored
Update Restore_Linux_Plex_Backup.sh
- Bug fix for default conf file. Double quotes not needed and cause issue #11 - Updated Restore_Linux_Plex_Backup.sh to handle reading settings from conf file with spaces and no double quotes.
1 parent 4bfaf6a commit ceae14d

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

Restore_Linux_Plex_Backup.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# shellcheck disable=SC2317,SC2181
33
#--------------------------------------------------------------------------
44
# Companion script for Linux Plex Backup script.
5-
# v1.0.4 02-Jul-2024 007revad
5+
# v1.0.5 09-Nov-2024 007revad
66
#
77
# MUST be run by a user in sudo, sudoers or wheel group, or as root
88
#
@@ -14,7 +14,7 @@
1414
# Script verified at https://www.shellcheck.net/
1515
#--------------------------------------------------------------------------
1616

17-
scriptver="v1.0.4"
17+
scriptver="v1.0.5"
1818
script=Restore_Linux_Plex_Backup
1919

2020

@@ -23,8 +23,10 @@ Backup_Directory=""
2323
Name=""
2424
LogAll=""
2525
if [[ -f $(dirname -- "$0";)/backup_linux_plex.config ]];then
26-
# shellcheck disable=SC1091
27-
source "$(dirname -- "$0";)"/backup_linux_plex.config
26+
# shellcheck disable=SC1090,SC1091
27+
while read -r var; do
28+
if [[ $var =~ ^[a-zA-Z0-9_]+=.* ]]; then export "$var"; fi
29+
done < "$(dirname -- "$0";)"/backup_linux_plex.config
2830
else
2931
echo "backup_linux_plex.config file missing!"
3032
exit 1
@@ -346,6 +348,7 @@ echo "=================================================" |& tee -a "${Log_File}"
346348
# Start Plex Media Server
347349

348350
echo "Starting Plex..." |& tee -a "${Log_File}"
351+
#/usr/lib/plexmediaserver/Resources/start.sh
349352
systemctl start plexmediaserver
350353

351354

0 commit comments

Comments
 (0)