diff --git a/btpl.sh b/btpl.sh index 59f62a7..6d05e86 100644 --- a/btpl.sh +++ b/btpl.sh @@ -1,10 +1,11 @@ #/bin/sh - if [ $# \< 2 ] then python3 ~/.bluetooth-proximity-locking/btpl.py [bluetooth address] > /dev/null & -elif [ "$1" = "-r" ] || [ "$1" = "--run" ] +elif [ [ "$1" = "-r" ] || [ "$1" = "--run" ] ] +then python3 ~/.bluetooth-proximity-locking/btpl.py [bluetooth address] > /dev/null & -elif [ "$1" = "-s" ] || [ "$1" = "--stop" ] +elif [ [ "$1" = "-s" ] || [ "$1" = "--stop" ] ] +then pkill ~/.bluetooth-proximity-locking/btpl.py fi