mirror of
https://git.phreedom.club/localhost_frssoft/bbs-telnet
synced 2024-11-23 22:59:20 +02:00
more stable killable
This commit is contained in:
parent
1b3c0d7930
commit
d99978288f
|
@ -18,7 +18,8 @@ timeline_home(){
|
||||||
remote_ip=$SOCAT_PEERADDR
|
remote_ip=$SOCAT_PEERADDR
|
||||||
die(){
|
die(){
|
||||||
rm access_granted/"$remote_ip"
|
rm access_granted/"$remote_ip"
|
||||||
pkill executor.sh
|
echo 'bye'
|
||||||
|
pkill -P $PPID
|
||||||
}
|
}
|
||||||
|
|
||||||
mkdir -p -m 700 access_granted
|
mkdir -p -m 700 access_granted
|
||||||
|
@ -35,10 +36,12 @@ cat - |
|
||||||
echo hi $remote_ip
|
echo hi $remote_ip
|
||||||
else
|
else
|
||||||
die
|
die
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ ! -f access_granted/"$remote_ip" ]; then # Drop unregistred handshake
|
if [ ! -f access_granted/"$remote_ip" ]; then # Drop unregistred handshake
|
||||||
die
|
die
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
# ---
|
# ---
|
||||||
case $cmd in
|
case $cmd in
|
||||||
|
@ -57,7 +60,7 @@ cat - |
|
||||||
*) echo 'only http(s)' ;;
|
*) echo 'only http(s)' ;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
*) die ;;
|
*) die; break ;;
|
||||||
esac
|
esac
|
||||||
printf 'bbs > '
|
printf 'bbs > '
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue