Do not auto-shutdown Tautulli in installers

This commit is contained in:
JonnyWong16 2020-04-26 22:28:42 -07:00
parent e546689e01
commit d5d219d46f
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
2 changed files with 3 additions and 12 deletions

View file

@ -218,9 +218,7 @@ Function .onInit
Loop: Loop:
${nsProcess::FindProcess} ${MAIN_APP_EXE} $R0 ${nsProcess::FindProcess} ${MAIN_APP_EXE} $R0
StrCmp $R0 0 0 NoAbort StrCmp $R0 0 0 NoAbort
MessageBox MB_ABORTRETRYIGNORE|MB_ICONEXCLAMATION "${APP_NAME} is still running. Please shutdown ${APP_NAME} before continuing.$\r$\n$\r$\nIgnore will attempt to shutdown ${APP_NAME} for you." IDABORT End IDRETRY Loop MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "${APP_NAME} is still running. Please shutdown ${APP_NAME} before continuing." IDCANCEL End IDRETRY Loop
${nsProcess::CloseProcess} ${MAIN_APP_EXE} $R0
StrCmp $R0 0 0 NoAbort
Goto Loop Goto Loop
End: End:
Abort Abort
@ -232,9 +230,7 @@ Function un.onInit
Loop: Loop:
${nsProcess::FindProcess} ${MAIN_APP_EXE} $R0 ${nsProcess::FindProcess} ${MAIN_APP_EXE} $R0
StrCmp $R0 0 0 NoAbort StrCmp $R0 0 0 NoAbort
MessageBox MB_ABORTRETRYIGNORE|MB_ICONEXCLAMATION "${APP_NAME} is still running. Please shutdown ${APP_NAME} before continuing.$\r$\n$\r$\nIgnore will attempt to shutdown ${APP_NAME} for you." IDABORT End IDRETRY Loop MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "${APP_NAME} is still running. Please shutdown ${APP_NAME} before continuing." IDCANCEL End IDRETRY Loop
${nsProcess::CloseProcess} ${MAIN_APP_EXE} $R0
StrCmp $R0 0 0 NoAbort
Goto Loop Goto Loop
End: End:
Abort Abort

View file

@ -3,16 +3,11 @@
function check_tautulli_running () { function check_tautulli_running () {
if pgrep -x "Tautulli" > /dev/null if pgrep -x "Tautulli" > /dev/null
then then
dialogText=`osascript -e 'set dialogText to button returned of (display dialog "Tautulli is still running. Please shutdown Tautulli before continuing." buttons {"Retry", "Shutdown Tautulli", "Abort"})'`; dialogText=`osascript -e 'set dialogText to button returned of (display dialog "Tautulli is still running. Please shutdown Tautulli before continuing." buttons {"Retry", "Abort"})'`;
if [[ $dialogText == 'Retry' ]] if [[ $dialogText == 'Retry' ]]
then then
check_tautulli_running; check_tautulli_running;
elif [[ $dialogText == 'Shutdown Tautulli' ]]
then
pkill Tautulli
while pgrep Tautulli > /dev/null; do sleep 1; done
check_tautulli_running;
elif [[ $dialogText == 'Abort' ]] elif [[ $dialogText == 'Abort' ]]
then then
exit 1; exit 1;