mirror of
https://github.com/ChuckPa/PlexDBRepair.git
synced 2025-11-06 03:08:55 -05:00
Handle unexpected EOL when scripted
This commit is contained in:
parent
b15d5a55c8
commit
a0184bdf24
15
DBRepair.sh
15
DBRepair.sh
@ -2,12 +2,12 @@
|
|||||||
#########################################################################
|
#########################################################################
|
||||||
# Plex Media Server database check and repair utility script. #
|
# Plex Media Server database check and repair utility script. #
|
||||||
# Maintainer: ChuckPa #
|
# Maintainer: ChuckPa #
|
||||||
# Version: v1.0.1 #
|
# Version: v1.0.2 #
|
||||||
# Date: 16-Mar-2023 #
|
# Date: 27-Mar-2023 #
|
||||||
#########################################################################
|
#########################################################################
|
||||||
|
|
||||||
# Version for display purposes
|
# Version for display purposes
|
||||||
Version="v1.0.1"
|
Version="v1.0.2"
|
||||||
|
|
||||||
# Flag when temp files are to be retained
|
# Flag when temp files are to be retained
|
||||||
Retain=0
|
Retain=0
|
||||||
@ -790,7 +790,7 @@ DoRepair() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Made it to here, now verify
|
# Made it to here, now verify
|
||||||
Output "Successfully imported SQL data."
|
Output "Successfully imported databases."
|
||||||
WriteLog "Repair - Import - PASS"
|
WriteLog "Repair - Import - PASS"
|
||||||
|
|
||||||
# Verify databases are intact and pass testing
|
# Verify databases are intact and pass testing
|
||||||
@ -1405,9 +1405,16 @@ do
|
|||||||
|
|
||||||
echo " 99 - exit"
|
echo " 99 - exit"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $Scripted -eq 0 ]; then
|
if [ $Scripted -eq 0 ]; then
|
||||||
echo ""
|
echo ""
|
||||||
printf "Enter command # -or- command name (4 char min) : "
|
printf "Enter command # -or- command name (4 char min) : "
|
||||||
|
else
|
||||||
|
Input="$1"
|
||||||
|
|
||||||
|
# If end of line then force exit
|
||||||
|
[ "$Input" = "" ] && Input="exit"
|
||||||
|
Output "Unexpected EOF / End of command line options, Exiting"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Watch for null command whether scripted or not.
|
# Watch for null command whether scripted or not.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user