From: Valentin Vidic Date: Mon, 31 Mar 2008 07:55:01 +0000 (+0200) Subject: Try harder to disable monit. X-Git-Tag: debian/4.0.1~10 X-Git-Url: http://ftp.carnet.hr/pub/carnet-debian/scm?a=commitdiff_plain;h=7f0bd6edb0cf18c7afe77710e19d70097f169b3b;p=carnet-upgrade.git Try harder to disable monit. --- diff --git a/src/actions/main.queue b/src/actions/main.queue index 4fb017d..716eb44 100644 --- a/src/actions/main.queue +++ b/src/actions/main.queue @@ -15,7 +15,7 @@ true create_sources_list true update # apt-get update & download true check_disk_space ! debconf_priority check debconf_priority set # utisaj debconf -# postgresql-common/etch zahtjeva da postgresql nije instaliran +pkg monit disable_monit true upgrade_libc true install_keyrings pkg skey-cn remove_skey @@ -24,8 +24,6 @@ pkg mrtg-cn post_upgrade pkgadd munin-cn pkg mrtg-cn pkgrm mrtg-cn # popravi konfiguracije koje stvaraju probleme true restore_configs -# monit stvara probleme postinst skriptama -pkg monit-cn pkgrm monit-cn # konacno, instalacija novih paketa pkg amavisd-cn upgrade_amavis pkg apache2-cn upgrade_apache2 diff --git a/src/functions.sh b/src/functions.sh index 62dbbe7..b595580 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -591,6 +591,22 @@ remove_skey () { fi } +# monit it causing problems for postinst scripts +# restarting daemons so try to disable it +disable_monit () { + if pkg monit-cn; then + pkgrm monit-cn # disables monit in prerm + fi + + # if configured manually + if pkg monit; then + # remove the binary but leave the config + apt-get remove --yes monit + # stop the binary + pkill -9 monit || true + fi +} + # make a silent upgrade to new libc6 upgrade_libc () { DEBIAN_FRONTEND=noninteractive pkgadd libc6