Hello community, here is the log from the commit of package monit checked in at Tue Apr 18 17:34:13 CEST 2006. -------- --- monit/monit.changes 2006-01-25 21:38:23.000000000 +0100 +++ STABLE/monit/monit.changes 2006-04-18 15:46:23.000000000 +0200 @@ -1,0 +2,7 @@ +Tue Apr 18 15:45:22 CEST 2006 - lmuelle@suse.de + +- Use kill instead of killproc to terminate monit if we start monit from + inittab. +- Add /etc/monit.d and /var/lib/monit directories. + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ monit.spec ++++++ --- /var/tmp/diff_new_pack.5peIM7/_old 2006-04-18 17:33:50.000000000 +0200 +++ /var/tmp/diff_new_pack.5peIM7/_new 2006-04-18 17:33:50.000000000 +0200 @@ -5,7 +5,7 @@ # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://bugs.opensuse.org +# Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild @@ -13,10 +13,10 @@ Name: monit BuildRequires: openssl-devel Version: 4.7 -Release: 2 +Release: 11 License: GPL Group: System/Monitoring -Summary: Service manager and monitor system +Summary: Service Manager and Monitor System URL: http://www.tildeslash.com/monit/ Autoreqprov: on Source: http://www.tildeslash.com/monit/dist/%{name}-%{version}.tar.bz2 @@ -35,15 +35,15 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build %description -Monit is a utility for managing and monitoring, processes, files, -directories and devices on a Unix system. Monit conducts automatic +Monit is a utility for managing and monitoring processes, files, +directories, and devices on a Unix system. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in -error situations. E.g. monit can start a process if it does not run, -restart a process if it does not respond and stop a process if it uses -to much resources. You can use monit to monitor files, directories and -devices for changes, such as timestamp changes, checksum changes or -size changes. You can even use monit to monitor remote hosts; monit can -ping a remote host and check port connections. +error situations. For example, monit can start a process if it does +not run, restart a process if it does not respond, and stop a process +if it uses too many resources. You can use monit to monitor files, +directories, and devices for changes, such as time stamp changes, +checksum changes, or size changes. You can even use monit to monitor +remote hosts: monit can ping a remote host and check port connections. @@ -76,11 +76,12 @@ install mkdir -p \ ${RPM_BUILD_ROOT}/%{_sysconfdir}/init.d \ + ${RPM_BUILD_ROOT}/%{_sysconfdir}/monit.d \ ${RPM_BUILD_ROOT}/%{_sbindir} \ ${RPM_BUILD_ROOT}/%{_datadir}/monit \ ${RPM_BUILD_ROOT}/%{_var}/adm/fillup-templates \ + ${RPM_BUILD_ROOT}/%{_var}/lib/monit \ ${RPM_BUILD_ROOT}/%{_var}/run/monit -cp -a monitrc ${RPM_BUILD_ROOT}/%{_sysconfdir} . vendor-files/sysconfig/monit.tmpl MONIT_BIN="/usr/bin/monit" MONIT_MODIFY_INITTAB="/usr/share/monit/monit-modifyinittab" @@ -88,6 +89,10 @@ MONIT_SYSCONFIG_FILE="/etc/sysconfig/monit" MONIT_INITTAB_STATE_FILE="/var/run/monit/monit-inittab.state" MONIT_ARGS="-p ${MONIT_PID_FILE} -s /var/run/monit/monit.state" +MONIT_EVENTQUE_DIR="/var/lib/monit" +sed -e "s%/var/monit%${MONIT_EVENTQUE_DIR}%g" \ + monitrc > \ + ${RPM_BUILD_ROOT}/%{_sysconfdir}/monitrc pushd vendor-files for templatefile in docu/README tools/monit-modifyinittab init/monit sysconfig/monit; do sed -e "s%__MONIT_RC_FILE__%${MONIT_RC_FILE}%g" \ @@ -128,6 +133,7 @@ %defattr(-,root,root) %doc CHANGES.txt CONTRIBUTORS COPYING FAQ.txt LICENSE PLATFORMS README* STATUS UPGRADE.txt doc %attr(0600, root, root) %config(noreplace) %{_sysconfdir}/monitrc +%dir %{_sysconfdir}/monit.d %attr(0754, root, root) %config %{_sysconfdir}/init.d/monit %{_sbindir}/rcmonit %{_bindir}/monit @@ -135,12 +141,17 @@ %dir %{_datadir}/monit %{_datadir}/monit/monit-modifyinittab %{_var}/adm/fillup-templates/sysconfig.monit +%dir %{_var}/lib/monit %dir %{_var}/run/monit %ghost %{_var}/run/monit/monit.pid %ghost %{_var}/run/monit/monit.state %ghost %{_var}/run/monit/monit-inittab.state %changelog -n monit +* Tue Apr 18 2006 - lmuelle@suse.de +- Use kill instead of killproc to terminate monit if we start monit from + inittab. +- Add /etc/monit.d and /var/lib/monit directories. * Wed Jan 25 2006 - mls@suse.de - converted neededforbuild to BuildRequires * Fri Jan 20 2006 - schwab@suse.de ++++++ vendor-files.tar.gz ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/vendor-files/init/monit.tmpl new/vendor-files/init/monit.tmpl --- old/vendor-files/init/monit.tmpl 2003-11-10 12:47:31.000000000 +0100 +++ new/vendor-files/init/monit.tmpl 2006-04-18 15:52:36.000000000 +0200 @@ -29,41 +29,41 @@ # Reset status of this service rc_reset -if [ x"$1" != x'stop' -a ! -f ${MONIT_SYSCONFIG_FILE} ]; then +if test "$1" != 'stop' -a ! -f "${MONIT_SYSCONFIG_FILE}"; then echo -n "Monit configuration file, ${MONIT_SYSCONFIG_FILE} does not exists. " # Tell the user this has skipped rc_status -s exit 6 -elif [ -f ${MONIT_SYSCONFIG_FILE} ]; then - . ${MONIT_SYSCONFIG_FILE} +elif test -f "${MONIT_SYSCONFIG_FILE}"; then + . "${MONIT_SYSCONFIG_FILE}" fi -if [ ! -x ${MONIT_BIN} ]; then +if test ! -x "${MONIT_BIN}"; then echo -n "Monit binary, ${MONIT_BIN} is not installed. " # Tell the user this has skipped rc_status -s exit 5 fi -if [ -z "${MONIT_RC_FILE}" ]; then +if test -z "${MONIT_RC_FILE}"; then MONIT_RC_FILE="/etc/monitrc" echo "MONIT_RC_FILE not set in configuration file, ${MONIT_SYSCONFIG_FILE}." echo "Using ${MONIT_RC_FILE} instead." fi -if [ x"$1" != x'stop' -a ! -f "${MONIT_RC_FILE}" ]; then +if test "$1" != 'stop' -a ! -f "${MONIT_RC_FILE}"; then echo -n "Monit configuration file, ${MONIT_RC_FILE} does not exist. " # Tell the user this has skipped rc_status -s exit 6 fi -if [ x"$1" != x'stop' ] && ! grep -qv '^[[:space:]]*#' "${MONIT_RC_FILE}"; then +if test "$1" != 'stop' && ! grep -qv '^[[:space:]]*#' "${MONIT_RC_FILE}"; then echo -n "Monit is not configured in ${MONIT_RC_FILE}. " # Tell the user this has skipped rc_status -s exit 6 fi -MONIT_OUT=$( ${MONIT_BIN} -t -I 2>&1) -if [ x"$1" != x'stop' -a $? -ne 0 ]; then +MONIT_OUT=$( "${MONIT_BIN}" -t -I 2>&1) +if test "$1" != 'stop' -a $? -ne 0; then echo ${MONIT_OUT} echo -n "Monit is not configured well in ${MONIT_RC_FILE}. " # Tell the user this has skipped @@ -74,42 +74,49 @@ case "$1" in start) echo -n "Starting monit " - if [ x"yes" = x${MONIT_VIA_INITTAB} ]; then + if test "yes" = "${MONIT_VIA_INITTAB}"; then echo "via /etc/inittab" - ${MONIT_MODIFY_INITTAB} --add && echo -en "${esc}[1A" + "${MONIT_MODIFY_INITTAB}" --add && echo -en "${esc}[1A" else - checkproc -p ${MONIT_PID_FILE} ${MONIT_BIN} && \ + checkproc -p "${MONIT_PID_FILE}" "${MONIT_BIN}" && \ echo -n " Warning: monit already running. " - startproc -p ${MONIT_PID_FILE} ${MONIT_BIN} -c "${MONIT_RC_FILE}" ${MONIT_ARGS} + startproc -p "${MONIT_PID_FILE}" "${MONIT_BIN}" -c "${MONIT_RC_FILE}" ${MONIT_ARGS} fi rc_status -v - test $? -eq 0 && touch ${MONIT_SUBSYS_FILE} + test $? -eq 0 && touch "${MONIT_SUBSYS_FILE}" ;; stop) echo -n "Shutting down monit " - if [ x"yes" = x${MONIT_VIA_INITTAB} ]; then + if test "yes" = "${MONIT_VIA_INITTAB}"; then echo "from /etc/inittab" - ${MONIT_MODIFY_INITTAB} --remove && echo -en "${esc}[1A" + "${MONIT_MODIFY_INITTAB}" --remove && echo -en "${esc}[1A" else - checkproc -p ${MONIT_PID_FILE} ${MONIT_BIN} || \ + checkproc -p "${MONIT_PID_FILE}" "${MONIT_BIN}" || \ echo -n " Warning: monit not running. " - killproc -p ${MONIT_PID_FILE} ${MONIT_BIN} + killproc -p "${MONIT_PID_FILE}" "${MONIT_BIN}" fi rc_status -v - test $? -eq 0 && rm -f ${MONIT_SUBSYS_FILE} + test $? -eq 0 && rm -f "${MONIT_SUBSYS_FILE}" ;; status) echo -n "Checking for service monit " - test x"yes" = x${MONIT_VIA_INITTAB} && \ + test "yes" = "${MONIT_VIA_INITTAB}" && \ echo -n "from /etc/inittab " - checkproc -p ${MONIT_PID_FILE} ${MONIT_BIN} + checkproc -p "${MONIT_PID_FILE}" "${MONIT_BIN}" rc_status -v ;; restart) - if [ x"yes" = x${MONIT_VIA_INITTAB} ]; then - echo -n "Restarting monit from /etc/inittab " - killproc -p ${MONIT_PID_FILE} ${MONIT_BIN} - else + if test "yes" = "${MONIT_VIA_INITTAB}"; then + FORCE_REINIT="no" + if test -e "${MONIT_PID_FILE}"; then + echo -n "Restarting monit from /etc/inittab " + kill $( cat "${MONIT_PID_FILE}") + else + echo "Warning: No pid file, ${MONIT_PID_FILE} found. Do not know which process to stop. Calling stop and start instead." + FORCE_REINIT="yes" + fi + fi + if test "${MONIT_VIA_INITTAB}" != "yes" -o "${FORCE_REINIT}" = "yes"; then $0 stop $0 start fi @@ -122,15 +129,15 @@ ;; reload|force-reload) echo -n "Reload service monit " - killproc -p ${MONIT_PID_FILE} -HUP ${MONIT_BIN} + killproc -p "${MONIT_PID_FILE}" -HUP "${MONIT_BIN}" rc_status -v - test $? -eq 0 && touch ${MONIT_SUBSYS_FILE} + test $? -eq 0 && touch "${MONIT_SUBSYS_FILE}" ;; poll) echo -n "Poll all monit services " - killproc -p ${MONIT_PID_FILE} -SIGUSR1 ${MONIT_BIN} + killproc -p "${MONIT_PID_FILE}" -SIGUSR1 "${MONIT_BIN}" rc_status -v - test $? -eq 0 && touch ${MONIT_SUBSYS_FILE} + test $? -eq 0 && touch "${MONIT_SUBSYS_FILE}" ;; *) echo "Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload|poll}" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...