Add check for iipid to remove server directory. - annna - Annna the nice friend… | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 3c8d08bf47e5486d78b3c1cf443df70a9c7ee57a | |
parent 91ba10fd572686a4fe41d8621e71a5472b8ca34b | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Sun, 19 Dec 2021 23:22:35 +0100 | |
Add check for iipid to remove server directory. | |
This will stop services listening on fifos. | |
Diffstat: | |
M annna-start-main | 11 +++++++++++ | |
1 file changed, 11 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/annna-start-main b/annna-start-main | |
@@ -40,6 +40,17 @@ ii -s "${server}" -v -t -p 6697 -n "$ircuser" \ | |
-f "Annna Robert-Houdin" & | |
iipid=$! | |
+{ | |
+ # Watch for ii to exit. Then remove the used directory to have all | |
+ # services disappear. | |
+ while kill -0 $iipid >/dev/null 2>&1; | |
+ do | |
+ sleep 1 | |
+ done | |
+ rm -rf $HOME/irc/${server} | |
+ | |
+} & | |
+ | |
## Waiting for the socket to be available. | |
while [ ! -e $HOME/irc/${server}/out ]; | |
do |