Skip to content

Commit 437e608

Browse files
Merge pull request #572 from ExtremeFiretop/Bug-Fix-Update-Process
Bug-Fix to Update Process
2 parents cb2c379 + dac0e6c commit 437e608

2 files changed

Lines changed: 23 additions & 9 deletions

File tree

MerlinAU.sh

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
set -u
1010

1111
## Set version for each Production Release ##
12-
readonly SCRIPT_VERSION=1.6.2
13-
readonly SCRIPT_VERSTAG="26051600"
12+
readonly SCRIPT_VERSION=1.6.3
13+
readonly SCRIPT_VERSTAG="26052100"
1414
readonly SCRIPT_NAME="MerlinAU"
1515
## Set to "master" for Production Releases ##
1616
SCRIPT_BRANCH="dev"
@@ -3062,15 +3062,18 @@ _SCRIPT_UPDATE_()
30623062
_SendEMailNotification_ SUCCESS_SCRIPT_UPDATE_STATUS
30633063
fi
30643064
sleep 1
3065-
if [ $# -lt 2 ] || [ -z "$2" ]
3065+
if [ $# -ge 2 ] && [ "$2" = "unattended" ]
3066+
then
3067+
return 0
3068+
fi
3069+
3070+
if "$isInteractive" && [ -t 0 ]
30663071
then
30673072
_ReleaseLock_
30683073
exec "$ScriptFilePath"
30693074
exit 0
3070-
elif [ "$2" = "unattended" ]
3071-
then
3072-
return 0
30733075
fi
3076+
return 0
30743077
else
30753078
if ! "$isInteractive"
30763079
then
@@ -3255,12 +3258,18 @@ _CheckForNewScriptUpdates_()
32553258
${REDct}v${SCRIPT_VERSION}${NOct} --> ${GRNct}v${DLRepoVersion}${NOct}"
32563259
_WriteVarDefToHelperJSFile_ "isScriptUpdateAvailable" "$DLRepoVersion"
32573260
if [ $# -gt 0 ] && [ "$1" = "-quietcheck" ]
3258-
then return 0
3261+
then
3262+
return 0
32593263
fi
32603264
Say "$myLAN_HostName - A new script version update (v$DLRepoVersion) is available to download."
32613265
if [ "$ScriptAutoUpdateSetting" = "ENABLED" ]
32623266
then
3263-
_SCRIPT_UPDATE_ force
3267+
if "$isInteractive" && [ -t 0 ]
3268+
then
3269+
_SCRIPT_UPDATE_ force
3270+
else
3271+
_SCRIPT_UPDATE_ force unattended
3272+
fi
32643273
fi
32653274
else
32663275
scriptUpdateNotify=0
@@ -12084,6 +12093,11 @@ FW_NewUpdateVerInit=TBD
1208412093
if [ $# -eq 0 ] || [ -z "$1" ] || \
1208512094
{ [ $# -gt 1 ] && [ "$1" = "reload" ] ; }
1208612095
then
12096+
if [ ! -t 0 ]; then
12097+
printf "MerlinAU: refusing to open menu without a TTY.\n" >&2
12098+
_DoExit_ 1
12099+
fi
12100+
1208712101
if ! _AcquireLock_ cliMenuLock
1208812102
then Say "Exiting..." ; exit 1 ; fi
1208912103

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.6.2
1+
1.6.3

0 commit comments

Comments
 (0)