X-Git-Url: https://plomlompom.com/repos/test.html?a=blobdiff_plain;f=bin%2Fscreen-irssi.sh;h=3c3d7c80dd6163ee0d238bb28e6e2c50cc47cd3e;hb=ce8e37989a146af86ec093c749e02fa2d82a434d;hp=1e61f46d85a2f7651acf73bfc381c18d6fcf34c4;hpb=e266775288bb115a23ef6b057d5903c99218d140;p=config diff --git a/bin/screen-irssi.sh b/bin/screen-irssi.sh index 1e61f46..3c3d7c8 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. +# Start shell in screen, wait until it's created, then start irssi in it. screen -d -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.