-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
+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