From: Ivan Rako Date: Sun, 21 Feb 2016 15:43:23 +0000 (+0100) Subject: izmjene za jessie X-Git-Tag: debian/1%5.9_cn0~5 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=5f60b25a07dea5c8672a7abbcbb8dc0e1e521f19;p=monit-cn.git izmjene za jessie --- diff --git a/debian/changelog b/debian/changelog index c145cd0..9d0a957 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +monit-cn (1:5.9~cn0) stable; urgency=low + + * prilagodbe za jessie + * dodan tomcat7 + + -- Ivan Rako Sun, 21 Feb 2016 16:26:53 +0100 + monit-cn (1:5.4.0) stable; urgency=low * prilagodbe za Wheezy diff --git a/debian/postinst b/debian/postinst index d503cf6..db5d0e6 100755 --- a/debian/postinst +++ b/debian/postinst @@ -71,59 +71,68 @@ update-monit.d || true # disable monit startup cp_check_and_sed '^startup[[:space:]]*=[[:space:]]*1' \ - 's/^startup[[:space:]]*=.*/startup=0/g' /etc/default/monit || true + 's/^startup[[:space:]]*=.*/startup=1/g' /etc/default/monit || true cp_check_and_sed '^START[[:space:]]*=[[:space:]]*yes' \ - 's/^START[[:space:]]*=.*/START=no/g' /etc/default/monit || true - -# systemv part -if ! grep -q 'CARNet package monit-cn' /etc/init.d/monit; then - echo "CN: Disabling monit SystemV script" - if [ -x "/etc/init.d/monit" ]; then - update-rc.d -f monit remove >/dev/null 2>&1 - if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - invoke-rc.d monit stop || true - else - /etc/init.d/monit stop || true - fi - fi - if [ -e "/etc/init.d/monit" ]; then - # shebang - head -n1 /etc/init.d/monit > /etc/init.d/monit.$$ - # middle part - cp-update monit-cn /etc/init.d/monit.$$ <> /etc/init.d/monit.$$ - mv -f /etc/init.d/monit.$$ /etc/init.d/monit - chmod +x /etc/init.d/monit - fi -fi + 's/^START[[:space:]]*=.*/START=yes/g' /etc/default/monit || true -# if old inittab is referencing sbin, fix it -if grep -q '/usr/sbin/monit' /etc/inittab; then - cp_check_and_sed '/usr/sbin/monit' \ - 's:/usr/sbin/monit:/usr/bin/monit:g' \ - /etc/inittab || true +# remove us from systemv monit script +if grep -q 'CARNet package monit-cn' /etc/init.d/monit; then + echo "CN: Removing monit workaround from /etc/init.d/monit -- systemd is in use" + cp-update -r monit-cn /etc/init.d/monit + chmod +x /etc/init.d/monit fi -# install as inittab service -if ! grep -q '/usr/bin/monit' /etc/inittab; then - echo "CN: Installing monit service in /etc/inittab" - cp -a /etc/inittab /etc/inittab.$$ - cp-update monit-cn /etc/inittab.$$ </dev/null 2>&1 +# if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then +# invoke-rc.d monit stop || true +# else +# /etc/init.d/monit stop || true +# fi +# fi +# if [ -e "/etc/init.d/monit" ]; then +# # shebang +# head -n1 /etc/init.d/monit > /etc/init.d/monit.$$ +# # middle part +# cp-update monit-cn /etc/init.d/monit.$$ <> /etc/init.d/monit.$$ +# mv -f /etc/init.d/monit.$$ /etc/init.d/monit +# chmod +x /etc/init.d/monit +# fi +#fi +# +## if old inittab is referencing sbin, fix it +#if grep -q '/usr/sbin/monit' /etc/inittab; then +# cp_check_and_sed '/usr/sbin/monit' \ +# 's:/usr/sbin/monit:/usr/bin/monit:g' \ +# /etc/inittab || true +#fi +# +## install as inittab service +#if ! grep -q '/usr/bin/monit' /etc/inittab; then +# echo "CN: Installing monit service in /etc/inittab" +# cp -a /etc/inittab /etc/inittab.$$ +# cp-update monit-cn /etc/inittab.$$ < 250 then restart +