From 7f0bd6edb0cf18c7afe77710e19d70097f169b3b Mon Sep 17 00:00:00 2001 From: Valentin Vidic Date: Mon, 31 Mar 2008 09:55:01 +0200 Subject: [PATCH] Try harder to disable monit. --- src/actions/main.queue | 4 +--- src/functions.sh | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) 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 -- 1.7.10.4