From dd4aff0992129a2913a7b4be2061b3bce6fc3c4a Mon Sep 17 00:00:00 2001 From: Martin Selbmann Date: Thu, 23 Sep 2021 01:15:43 +0200 Subject: [PATCH] some bugfixes in automount.sh for killing player --- automount.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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"