add killport to install and manage scripts

This commit is contained in:
alihan
2023-05-17 00:46:37 +03:00
parent 7830b56170
commit 88ddd5b934
2 changed files with 12 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ elif [ "$1" == "connect-drone" ]; then
elif [ "$1" == "disconnect-drone" ]; then
wpa_supp_pid_file="$pids_dir/wpa_supp_pid.txt"
if [ -f "$wpa_supp_pid_file" ]; then
pkill -P $(cat $wpa_supp_pid_file)
sudo pkill -P $(cat $wpa_supp_pid_file)
echo "stopped drone connection via wpa_supp"
fi
@@ -134,6 +134,7 @@ elif [ "$1" == "stop-commander" ]; then
commander_pid_file="$pids_dir/commander_pid.txt"
if [ -f "$commander_pid_file" ]; then
pkill -P $(cat $commander_pid_file)
sudo killport 8889
echo "stopped commander"
fi