Add check for iipid to remove server directory. - annna - Annna the nice friendly bot. HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/ DIR Log DIR Files DIR Refs DIR Tags DIR README --- DIR commit 3c8d08bf47e5486d78b3c1cf443df70a9c7ee57a DIR parent 91ba10fd572686a4fe41d8621e71a5472b8ca34b HTML Author: Annna Robert-Houdin <annna@bitreich.org> 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(-) --- DIR 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