mirror of
https://github.com/Tautulli/Tautulli.git
synced 2024-11-21 04:50:36 -08:00
21 lines
532 B
Bash
Executable File
21 lines
532 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
function check_tautulli_running () {
|
|
if pgrep -x "Tautulli" > /dev/null
|
|
then
|
|
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' ]]
|
|
then
|
|
check_tautulli_running;
|
|
elif [[ $dialogText == 'Abort' ]]
|
|
then
|
|
exit 1;
|
|
fi
|
|
else
|
|
exit 0;
|
|
fi
|
|
}
|
|
|
|
check_tautulli_running;
|