diff --git a/automount.sh b/automount.sh index d6d187c..2d88401 100755 --- a/automount.sh +++ b/automount.sh @@ -36,13 +36,14 @@ while true; do echo "Terminating $playersh" pkill $playersh echo "Done!" - fi - playerstat="$(pgrep $player)" - if [ -n "$playerstat" ]; then - echo "Terminating $player" - pkill $player - echo "Done!" + playerstat="$(pgrep $player)" + if [ -n "$playerstat" ]; then + echo "Terminating $player" + pkill $player + echo "Done!" + fi + fi echo "Umounting $mountpoint"