some bugfixes in automount.sh for killing player

This commit is contained in:
Martin Selbmann 2021-09-23 01:15:43 +02:00
parent 386ddff770
commit dd4aff0992
1 changed files with 7 additions and 6 deletions

View File

@ -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"