# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
-MONIT_DIR=/etc/monit.d
+MONIT_DIR=/etc/monit/conf.d
TEMPLATES_DIR=/usr/share/monit-cn
return 0
fi
- if cmp -s "$filename" "${TEMPLATES_DIR}/${serviceconf}"; then
+ if ! cmp -s "$filename" "${TEMPLATES_DIR}/${serviceconf}"; then
RET=1
return 1
fi
if [ $changed -eq 1 ]; then
echo "CN: Stopping/restarting monit service"
- pkill -9 -f /usr/sbin/monit || true
+ #pkill -9 -f /usr/bin/monit || true
+ service monit restart
else
echo "CN: No new services detected, sorry"
fi