diff --git a/fix-active b/fix-active index 356e6ec8..0c5571e8 100755 --- a/fix-active +++ b/fix-active @@ -59,7 +59,37 @@ fi echo "arrêt d'innd..." #ctlinnd throttle 'COUPURE TEMPORAIRE - fix-active' #ctlinnd shutdown 'fix-active' -/id/inn2 stop + + +# +#/id/inn2 stop +#### Pour avoir des logs plus clairs, on remplace stop par un message personnalisé. +# +su news -c '/usr/lib/news/bin/ctlinnd shutdown 'réparation active'' + + # Stop innwatch (if running) + if [ -f /var/run/news/innwatch.pid ]; then + su news -c 'kill `cat /var/run/news/innwatch.pid`' + rm -f /var/run/news/innwatch.pid + fi + + # wait for innd to exit (up to 60 sec) + printf "Stopping innd: " +/bin/su news -c 'i=12 + while [ $i -gt 0 ]; + do + pid=`cat /var/run/news/innd.pid 2>/dev/null` + [ "$pid" = "" ] && break + kill -0 $pid 2>/dev/null || break + sleep 5 + printf "." + i=`expr $i - 1` + done' + printf "\n" + +#### fin du stop personnalisé. + + sleep 2 sync