X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=bin%2Fscreen-irssi.sh;h=898968ec21391a392a25d03dc952ab26c26218b2;hb=48a7b1324ef58cb13d50bd1b1ba8ae71a59c9be2;hp=1e61f46d85a2f7651acf73bfc381c18d6fcf34c4;hpb=822fe8e489823bb5c1e6a8a90ebda2ba7e35cf9f;p=config diff --git a/bin/screen-irssi.sh b/bin/screen-irssi.sh index 1e61f46..898968e 100755 --- a/bin/screen-irssi.sh +++ b/bin/screen-irssi.sh @@ -6,10 +6,13 @@ while [ $online -eq 0 ]; do ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` > /dev/null && \ online=1 || online=0 done -echo 1 -# Start irssi in shell in screen. -screen -d -m -S irssi +# Start shell in screen, wait until it's created, then start irssi in it. +screen -d -U -m -S irssi +screen_available=0 +while [ $screen_available -eq 0 ]; do + screen_available=`screen -list | grep irssi | wc -l` +done screen -S irssi -X stuff 'irssi\n' # Send mail to remind user to re-identify to NickServ.