annna-start-checker-dbg - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
annna-start-checker-dbg (438B) | |
--- | |
1 #!/bin/sh | |
2 # | |
3 # Watch for annna, she's worth it. | |
4 # | |
5 | |
6 export PATH="$PATH:/home/annna/bin" | |
7 | |
8 while /bin/true; | |
9 do | |
10 # Is annna still in her world? | |
11 socatpid="$(pgrep -U annna -x socat)" | |
12 iipid="$(pgrep -U annna -x ii)" | |
13 | |
14 if [ -z "$socatpid" ] || [ -z "$iipid" ]; | |
15 then | |
16 printf "checker: Starting annna.\n" | |
17 sh -x annna-stop-socat | |
18 sh -x annna-stop-services | |
19 sh -x annna-start-main | |
20 fi | |
21 | |
22 printf "checker: sleeping 5 seconds.\n" | |
23 sleep 5 | |
24 done | |
25 |