Tweak: Better supported syntax for URI on Linux
[einar-bin] / check_weechat
1 #!/bin/bash
2 # Short script to help keeping weechat alive
3 if test $(ps x | grep SCREEN | grep weechat-curses | grep -v grep | wc -l) -gt 0
4 then
5 # screen process with ID weechat is running, exit silently
6 exit 0
7 else
8 # No screen process with ID weechat is running, restart screen
9 screen -U -d -m -s /bin/bash -S weechat -T screen-256color weechat-curses
10 fi