more stable killable

This commit is contained in:
localhost_frssoft 2023-07-21 22:18:04 +03:00
parent 1b3c0d7930
commit d99978288f

View File

@ -18,7 +18,8 @@ timeline_home(){
remote_ip=$SOCAT_PEERADDR
die(){
rm access_granted/"$remote_ip"
pkill executor.sh
echo 'bye'
pkill -P $PPID
}
mkdir -p -m 700 access_granted
@ -35,10 +36,12 @@ cat - |
echo hi $remote_ip
else
die
break
fi
fi
if [ ! -f access_granted/"$remote_ip" ]; then # Drop unregistred handshake
die
break
fi
# ---
case $cmd in
@ -57,7 +60,7 @@ cat - |
*) echo 'only http(s)' ;;
esac
;;
*) die ;;
*) die; break ;;
esac
printf 'bbs > '
done