X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=bin%2Fscreen-irssi.sh;h=898968ec21391a392a25d03dc952ab26c26218b2;hb=76537b041c4aae17ed4b30580f3a41d2248a91f2;hp=4f11aa288431d767c40a761ca0893c2047fb7d58;hpb=1d2507e56b471fa29c42dc220817b27632d7667a;p=config diff --git a/bin/screen-irssi.sh b/bin/screen-irssi.sh index 4f11aa2..898968e 100755 --- a/bin/screen-irssi.sh +++ b/bin/screen-irssi.sh @@ -6,8 +6,14 @@ 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. +~/config/bin/simplemail.sh ~/config/mails/irssi_identify_reminder