home
·
contact
·
privacy
projects
/
config
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e266775
)
Fix race condition in irssi screen script.
author
Christian Heller
<c.heller@plomlompom.de>
Mon, 12 Oct 2015 00:47:27 +0000
(
02:47
+0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Mon, 12 Oct 2015 00:47:27 +0000
(
02:47
+0200)
bin/screen-irssi.sh
patch
|
blob
|
history
diff --git
a/bin/screen-irssi.sh
b/bin/screen-irssi.sh
index 1e61f46d85a2f7651acf73bfc381c18d6fcf34c4..3c3d7c80dd6163ee0d238bb28e6e2c50cc47cd3e 100755
(executable)
--- 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.