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:
81a7321
)
Fix irssi screen connection wait.
author
Christian Heller
<c.heller@plomlompom.de>
Tue, 29 Sep 2015 02:36:45 +0000
(
04:36
+0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Tue, 29 Sep 2015 02:36:45 +0000
(
04:36
+0200)
other/screen-irssi.sh
patch
|
blob
|
history
diff --git
a/other/screen-irssi.sh
b/other/screen-irssi.sh
index 0bfdd4a883f5417a62ff57d2fc50686fd8f6f6e1..4f11aa288431d767c40a761ca0893c2047fb7d58 100644
(file)
--- a/
other/screen-irssi.sh
+++ b/
other/screen-irssi.sh
@@
-1,3
+1,13
@@
#!/bin/sh
+
+# Wait until online.
+online=0
+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
screen -S irssi -X stuff 'irssi\n'