diff --git a/build/exadata/DEBIAN/hc-exadata-platform/conffiles b/build/exadata/DEBIAN/hc-exadata-platform/conffiles new file mode 100644 index 0000000..b3e9152 --- /dev/null +++ b/build/exadata/DEBIAN/hc-exadata-platform/conffiles @@ -0,0 +1,4 @@ +/etc/opt/hc/check_exadata_zfs_logs.conf +/etc/opt/hc/check_exadata_zfs_services.conf +/etc/opt/hc/check_exadata_zfs_share_replication.conf +/etc/opt/hc/check_exadata_zfs_share_usage.conf diff --git a/build/exadata/DEBIAN/hc-exadata-platform/control b/build/exadata/DEBIAN/hc-exadata-platform/control new file mode 100644 index 0000000..0facc94 --- /dev/null +++ b/build/exadata/DEBIAN/hc-exadata-platform/control @@ -0,0 +1,11 @@ +Package: hc-exadata-platform +Version: %BUILD_DATE% +Architecture: all +Maintainer: Patrick Van der Veken +Essential: no +Installed-Size: 300 +Depends: hc-linux +Section: tools +Priority: extra +Description: The KUDOS Health Checker (HC) for UNIX (Exadata platform plugins). The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as +well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc. This package contains platform/OS specific plugins. diff --git a/build/exadata/DEBIAN/hc-exadata-platform/postinst b/build/exadata/DEBIAN/hc-exadata-platform/postinst new file mode 100755 index 0000000..28436cc --- /dev/null +++ b/build/exadata/DEBIAN/hc-exadata-platform/postinst @@ -0,0 +1,14 @@ +#!/bin/bash +# ------------------------- CONFIGURATION starts here ------------------------- +# location of check_health.sh +HC_BIN="/opt/hc/bin/check_health.sh" +PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" +# ------------------------- CONFIGURATION ends here --------------------------- +echo "INFO: starting post-install script ..." +# refresh symbolic FPATH links +if [[ -x ${HC_BIN} ]] +then + ${HC_BIN} --fix-symlinks + (( $? == 0 )) || echo "WARN: updating symlinks failed" +fi +echo "INFO: finished post-install script" \ No newline at end of file diff --git a/build/exadata/DEBIAN/hc-exadata-platform/postrm b/build/exadata/DEBIAN/hc-exadata-platform/postrm new file mode 100755 index 0000000..5a94196 --- /dev/null +++ b/build/exadata/DEBIAN/hc-exadata-platform/postrm @@ -0,0 +1,14 @@ +#!/bin/bash +# ------------------------- CONFIGURATION starts here ------------------------- +# location of check_health.sh +HC_BIN="/opt/hc/bin/check_health.sh" +PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" +# ------------------------- CONFIGURATION ends here --------------------------- +echo "INFO: starting post-uninstall script ..." +# refresh symbolic FPATH links +if [[ -x ${HC_BIN} ]] +then + ${HC_BIN} --fix-symlinks + (( $? == 0 )) || echo "WARN: updating symlinks failed" +fi +echo "INFO: finished post-uninstall script" \ No newline at end of file diff --git a/build/exadata/SPECS/hc-exadata-platform.spec b/build/exadata/SPECS/hc-exadata-platform.spec index f1d462f..a40d503 100644 --- a/build/exadata/SPECS/hc-exadata-platform.spec +++ b/build/exadata/SPECS/hc-exadata-platform.spec @@ -4,7 +4,7 @@ Name: hc-exadata-platform Version: %{build_timestamp} Release: 1 -Summary: The KUDOS Health Checker (HC) for UNIX (platform plugins) +Summary: The KUDOS Health Checker (HC) for UNIX (Exadata platform plugins) Group: Tools/Monitoring License: GNU General Public License either version 2 of the License, or (at your option) any later version diff --git a/build/linux/DEBIAN/hc-display-csv/control b/build/linux/DEBIAN/hc-display-csv/control new file mode 100644 index 0000000..cac34c9 --- /dev/null +++ b/build/linux/DEBIAN/hc-display-csv/control @@ -0,0 +1,11 @@ +Package: hc-display-csv +Version: %BUILD_DATE% +Architecture: all +Maintainer: Patrick Van der Veken +Essential: no +Installed-Size: 50 +Depends: hc-linux +Section: tools +Priority: extra +Description: The KUDOS Health Checker (HC) for UNIX (CSV display core plugin). The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as +well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc. This package contains core plugins (display). diff --git a/build/linux/DEBIAN/hc-display-csv/postinst b/build/linux/DEBIAN/hc-display-csv/postinst new file mode 100755 index 0000000..28436cc --- /dev/null +++ b/build/linux/DEBIAN/hc-display-csv/postinst @@ -0,0 +1,14 @@ +#!/bin/bash +# ------------------------- CONFIGURATION starts here ------------------------- +# location of check_health.sh +HC_BIN="/opt/hc/bin/check_health.sh" +PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" +# ------------------------- CONFIGURATION ends here --------------------------- +echo "INFO: starting post-install script ..." +# refresh symbolic FPATH links +if [[ -x ${HC_BIN} ]] +then + ${HC_BIN} --fix-symlinks + (( $? == 0 )) || echo "WARN: updating symlinks failed" +fi +echo "INFO: finished post-install script" \ No newline at end of file diff --git a/build/linux/DEBIAN/hc-display-csv/postrm b/build/linux/DEBIAN/hc-display-csv/postrm new file mode 100755 index 0000000..5a94196 --- /dev/null +++ b/build/linux/DEBIAN/hc-display-csv/postrm @@ -0,0 +1,14 @@ +#!/bin/bash +# ------------------------- CONFIGURATION starts here ------------------------- +# location of check_health.sh +HC_BIN="/opt/hc/bin/check_health.sh" +PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" +# ------------------------- CONFIGURATION ends here --------------------------- +echo "INFO: starting post-uninstall script ..." +# refresh symbolic FPATH links +if [[ -x ${HC_BIN} ]] +then + ${HC_BIN} --fix-symlinks + (( $? == 0 )) || echo "WARN: updating symlinks failed" +fi +echo "INFO: finished post-uninstall script" \ No newline at end of file diff --git a/build/linux/DEBIAN/hc-display-init/control b/build/linux/DEBIAN/hc-display-init/control new file mode 100644 index 0000000..219cd08 --- /dev/null +++ b/build/linux/DEBIAN/hc-display-init/control @@ -0,0 +1,11 @@ +Package: hc-display-init +Version: %BUILD_DATE% +Architecture: all +Maintainer: Patrick Van der Veken +Essential: no +Installed-Size: 50 +Depends: hc-linux +Section: tools +Priority: extra +Description: The KUDOS Health Checker (HC) for UNIX (INIT display core plugin). The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as +well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc. This package contains core plugins (display). diff --git a/build/linux/DEBIAN/hc-display-init/postinst b/build/linux/DEBIAN/hc-display-init/postinst new file mode 100755 index 0000000..28436cc --- /dev/null +++ b/build/linux/DEBIAN/hc-display-init/postinst @@ -0,0 +1,14 @@ +#!/bin/bash +# ------------------------- CONFIGURATION starts here ------------------------- +# location of check_health.sh +HC_BIN="/opt/hc/bin/check_health.sh" +PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" +# ------------------------- CONFIGURATION ends here --------------------------- +echo "INFO: starting post-install script ..." +# refresh symbolic FPATH links +if [[ -x ${HC_BIN} ]] +then + ${HC_BIN} --fix-symlinks + (( $? == 0 )) || echo "WARN: updating symlinks failed" +fi +echo "INFO: finished post-install script" \ No newline at end of file diff --git a/build/linux/DEBIAN/hc-display-init/postrm b/build/linux/DEBIAN/hc-display-init/postrm new file mode 100755 index 0000000..5a94196 --- /dev/null +++ b/build/linux/DEBIAN/hc-display-init/postrm @@ -0,0 +1,14 @@ +#!/bin/bash +# ------------------------- CONFIGURATION starts here ------------------------- +# location of check_health.sh +HC_BIN="/opt/hc/bin/check_health.sh" +PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" +# ------------------------- CONFIGURATION ends here --------------------------- +echo "INFO: starting post-uninstall script ..." +# refresh symbolic FPATH links +if [[ -x ${HC_BIN} ]] +then + ${HC_BIN} --fix-symlinks + (( $? == 0 )) || echo "WARN: updating symlinks failed" +fi +echo "INFO: finished post-uninstall script" \ No newline at end of file diff --git a/build/linux/DEBIAN/hc-display-json/control b/build/linux/DEBIAN/hc-display-json/control new file mode 100644 index 0000000..9aeadfe --- /dev/null +++ b/build/linux/DEBIAN/hc-display-json/control @@ -0,0 +1,11 @@ +Package: hc-display-json +Version: %BUILD_DATE% +Architecture: all +Maintainer: Patrick Van der Veken +Essential: no +Installed-Size: 50 +Depends: hc-linux +Section: tools +Priority: extra +Description: The KUDOS Health Checker (HC) for UNIX (JSON display core plugin). The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as +well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc. This package contains core plugins (display). diff --git a/build/linux/DEBIAN/hc-display-json/postinst b/build/linux/DEBIAN/hc-display-json/postinst new file mode 100755 index 0000000..28436cc --- /dev/null +++ b/build/linux/DEBIAN/hc-display-json/postinst @@ -0,0 +1,14 @@ +#!/bin/bash +# ------------------------- CONFIGURATION starts here ------------------------- +# location of check_health.sh +HC_BIN="/opt/hc/bin/check_health.sh" +PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" +# ------------------------- CONFIGURATION ends here --------------------------- +echo "INFO: starting post-install script ..." +# refresh symbolic FPATH links +if [[ -x ${HC_BIN} ]] +then + ${HC_BIN} --fix-symlinks + (( $? == 0 )) || echo "WARN: updating symlinks failed" +fi +echo "INFO: finished post-install script" \ No newline at end of file diff --git a/build/linux/DEBIAN/hc-display-json/postrm b/build/linux/DEBIAN/hc-display-json/postrm new file mode 100755 index 0000000..5a94196 --- /dev/null +++ b/build/linux/DEBIAN/hc-display-json/postrm @@ -0,0 +1,14 @@ +#!/bin/bash +# ------------------------- CONFIGURATION starts here ------------------------- +# location of check_health.sh +HC_BIN="/opt/hc/bin/check_health.sh" +PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" +# ------------------------- CONFIGURATION ends here --------------------------- +echo "INFO: starting post-uninstall script ..." +# refresh symbolic FPATH links +if [[ -x ${HC_BIN} ]] +then + ${HC_BIN} --fix-symlinks + (( $? == 0 )) || echo "WARN: updating symlinks failed" +fi +echo "INFO: finished post-uninstall script" \ No newline at end of file diff --git a/build/linux/DEBIAN/hc-display-terse/control b/build/linux/DEBIAN/hc-display-terse/control new file mode 100644 index 0000000..ea20434 --- /dev/null +++ b/build/linux/DEBIAN/hc-display-terse/control @@ -0,0 +1,11 @@ +Package: hc-display-terse +Version: %BUILD_DATE% +Architecture: all +Maintainer: Patrick Van der Veken +Essential: no +Installed-Size: 50 +Depends: hc-linux +Section: tools +Priority: extra +Description: The KUDOS Health Checker (HC) for UNIX (Terse display core plugin). The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as +well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc. This package contains core plugins (display). diff --git a/build/linux/DEBIAN/hc-display-terse/postinst b/build/linux/DEBIAN/hc-display-terse/postinst new file mode 100755 index 0000000..28436cc --- /dev/null +++ b/build/linux/DEBIAN/hc-display-terse/postinst @@ -0,0 +1,14 @@ +#!/bin/bash +# ------------------------- CONFIGURATION starts here ------------------------- +# location of check_health.sh +HC_BIN="/opt/hc/bin/check_health.sh" +PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" +# ------------------------- CONFIGURATION ends here --------------------------- +echo "INFO: starting post-install script ..." +# refresh symbolic FPATH links +if [[ -x ${HC_BIN} ]] +then + ${HC_BIN} --fix-symlinks + (( $? == 0 )) || echo "WARN: updating symlinks failed" +fi +echo "INFO: finished post-install script" \ No newline at end of file diff --git a/build/linux/DEBIAN/hc-display-terse/postrm b/build/linux/DEBIAN/hc-display-terse/postrm new file mode 100755 index 0000000..5a94196 --- /dev/null +++ b/build/linux/DEBIAN/hc-display-terse/postrm @@ -0,0 +1,14 @@ +#!/bin/bash +# ------------------------- CONFIGURATION starts here ------------------------- +# location of check_health.sh +HC_BIN="/opt/hc/bin/check_health.sh" +PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" +# ------------------------- CONFIGURATION ends here --------------------------- +echo "INFO: starting post-uninstall script ..." +# refresh symbolic FPATH links +if [[ -x ${HC_BIN} ]] +then + ${HC_BIN} --fix-symlinks + (( $? == 0 )) || echo "WARN: updating symlinks failed" +fi +echo "INFO: finished post-uninstall script" \ No newline at end of file diff --git a/build/linux/DEBIAN/hc-display-zenoss/control b/build/linux/DEBIAN/hc-display-zenoss/control new file mode 100644 index 0000000..d629e67 --- /dev/null +++ b/build/linux/DEBIAN/hc-display-zenoss/control @@ -0,0 +1,11 @@ +Package: hc-display-zenoss +Version: %BUILD_DATE% +Architecture: all +Maintainer: Patrick Van der Veken +Essential: no +Installed-Size: 50 +Depends: hc-linux +Section: tools +Priority: extra +Description: The KUDOS Health Checker (HC) for UNIX (Zenoss display core plugin). The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as +well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc. This package contains core plugins (display). diff --git a/build/linux/DEBIAN/hc-display-zenoss/postinst b/build/linux/DEBIAN/hc-display-zenoss/postinst new file mode 100755 index 0000000..28436cc --- /dev/null +++ b/build/linux/DEBIAN/hc-display-zenoss/postinst @@ -0,0 +1,14 @@ +#!/bin/bash +# ------------------------- CONFIGURATION starts here ------------------------- +# location of check_health.sh +HC_BIN="/opt/hc/bin/check_health.sh" +PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" +# ------------------------- CONFIGURATION ends here --------------------------- +echo "INFO: starting post-install script ..." +# refresh symbolic FPATH links +if [[ -x ${HC_BIN} ]] +then + ${HC_BIN} --fix-symlinks + (( $? == 0 )) || echo "WARN: updating symlinks failed" +fi +echo "INFO: finished post-install script" \ No newline at end of file diff --git a/build/linux/DEBIAN/hc-display-zenoss/postrm b/build/linux/DEBIAN/hc-display-zenoss/postrm new file mode 100755 index 0000000..5a94196 --- /dev/null +++ b/build/linux/DEBIAN/hc-display-zenoss/postrm @@ -0,0 +1,14 @@ +#!/bin/bash +# ------------------------- CONFIGURATION starts here ------------------------- +# location of check_health.sh +HC_BIN="/opt/hc/bin/check_health.sh" +PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" +# ------------------------- CONFIGURATION ends here --------------------------- +echo "INFO: starting post-uninstall script ..." +# refresh symbolic FPATH links +if [[ -x ${HC_BIN} ]] +then + ${HC_BIN} --fix-symlinks + (( $? == 0 )) || echo "WARN: updating symlinks failed" +fi +echo "INFO: finished post-uninstall script" \ No newline at end of file diff --git a/build/linux/DEBIAN/hc-linux-platform/conffiles b/build/linux/DEBIAN/hc-linux-platform/conffiles new file mode 100644 index 0000000..66b4ce3 --- /dev/null +++ b/build/linux/DEBIAN/hc-linux-platform/conffiles @@ -0,0 +1,21 @@ +/etc/opt/hc/check_linux_burp_backup.conf +/etc/opt/hc/check_linux_es_status.conf +/etc/opt/hc/check_linux_file_age.conf +/etc/opt/hc/check_linux_file_change.conf +/etc/opt/hc/check_linux_fs_usage.conf +/etc/opt/hc/check_linux_hpacucli.conf +/etc/opt/hc/check_linux_hpasmcli.conf +/etc/opt/hc/check_linux_hplog.conf +/etc/opt/hc/check_linux_hpssacli.conf +/etc/opt/hc/check_linux_mysqld_status.conf +/etc/opt/hc/check_linux_ntp_status.conf +/etc/opt/hc/check_linux_process_limits.conf +/etc/opt/hc/check_linux_root_crontab.conf +/etc/opt/hc/check_linux_sg_cluster_config.conf +/etc/opt/hc/check_linux_sg_cluster_status.conf +/etc/opt/hc/check_linux_sg_package_config.conf +/etc/opt/hc/check_linux_sg_package_status.conf +/etc/opt/hc/check_linux_vz_ct_counters.conf +/etc/opt/hc/check_linux_vz_ct_status.conf +/etc/opt/hc/core/templates/mail_body.tpl-check_linux_fs_mounts_options +/etc/opt/hc/core/templates/mail_body.tpl-check_linux_root_crontab diff --git a/build/linux/DEBIAN/hc-linux-platform/control b/build/linux/DEBIAN/hc-linux-platform/control new file mode 100644 index 0000000..ed189c3 --- /dev/null +++ b/build/linux/DEBIAN/hc-linux-platform/control @@ -0,0 +1,11 @@ +Package: hc-linux-platform +Version: %BUILD_DATE% +Architecture: all +Maintainer: Patrick Van der Veken +Essential: no +Installed-Size: 300 +Depends: hc-linux +Section: tools +Priority: extra +Description: The KUDOS Health Checker (HC) for UNIX (platform plugins). The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as +well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc. This package contains platform/OS specific plugins. diff --git a/build/linux/DEBIAN/hc-linux-platform/postinst b/build/linux/DEBIAN/hc-linux-platform/postinst new file mode 100755 index 0000000..28436cc --- /dev/null +++ b/build/linux/DEBIAN/hc-linux-platform/postinst @@ -0,0 +1,14 @@ +#!/bin/bash +# ------------------------- CONFIGURATION starts here ------------------------- +# location of check_health.sh +HC_BIN="/opt/hc/bin/check_health.sh" +PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" +# ------------------------- CONFIGURATION ends here --------------------------- +echo "INFO: starting post-install script ..." +# refresh symbolic FPATH links +if [[ -x ${HC_BIN} ]] +then + ${HC_BIN} --fix-symlinks + (( $? == 0 )) || echo "WARN: updating symlinks failed" +fi +echo "INFO: finished post-install script" \ No newline at end of file diff --git a/build/linux/DEBIAN/hc-linux-platform/postrm b/build/linux/DEBIAN/hc-linux-platform/postrm new file mode 100755 index 0000000..5a94196 --- /dev/null +++ b/build/linux/DEBIAN/hc-linux-platform/postrm @@ -0,0 +1,14 @@ +#!/bin/bash +# ------------------------- CONFIGURATION starts here ------------------------- +# location of check_health.sh +HC_BIN="/opt/hc/bin/check_health.sh" +PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" +# ------------------------- CONFIGURATION ends here --------------------------- +echo "INFO: starting post-uninstall script ..." +# refresh symbolic FPATH links +if [[ -x ${HC_BIN} ]] +then + ${HC_BIN} --fix-symlinks + (( $? == 0 )) || echo "WARN: updating symlinks failed" +fi +echo "INFO: finished post-uninstall script" \ No newline at end of file diff --git a/build/linux/DEBIAN/hc-linux/conffiles b/build/linux/DEBIAN/hc-linux/conffiles new file mode 100644 index 0000000..b8c8978 --- /dev/null +++ b/build/linux/DEBIAN/hc-linux/conffiles @@ -0,0 +1,7 @@ +/etc/logrotate.d/check_health +/etc/opt/hc/check_host.conf +/etc/opt/hc/core/check_health.conf +/etc/opt/hc/core/templates/mail_body.tpl +/etc/opt/hc/core/templates/mail_footer.tpl +/etc/opt/hc/core/templates/mail_header.tpl +/etc/opt/hc/core/templates/mail_info.tpl diff --git a/build/linux/DEBIAN/hc-linux/control b/build/linux/DEBIAN/hc-linux/control new file mode 100644 index 0000000..aeaa6b1 --- /dev/null +++ b/build/linux/DEBIAN/hc-linux/control @@ -0,0 +1,11 @@ +Package: hc-linux +Version: %BUILD_DATE% +Architecture: all +Maintainer: Patrick Van der Veken +Essential: no +Installed-Size: 300 +Depends: ksh +Section: tools +Priority: extra +Description: The KUDOS Health Checker (HC) for UNIX. The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as +well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc. diff --git a/build/linux/DEBIAN/hc-linux/postinst b/build/linux/DEBIAN/hc-linux/postinst new file mode 100644 index 0000000..c04abea --- /dev/null +++ b/build/linux/DEBIAN/hc-linux/postinst @@ -0,0 +1,42 @@ +#!/bin/bash +# ------------------------- CONFIGURATION starts here ------------------------- +# location of the HC scripts +HC_DIR="/opt/hc" +# location of the HC configuration files +HC_ETC_DIR="/etc/opt/hc" +# location of the HC log/state files +HC_VAR_DIR="/var/opt/hc" +# location of check_health.sh +HC_BIN="/opt/hc/bin/check_health.sh" +PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" +# ------------------------- CONFIGURATION ends here --------------------------- +echo "INFO: starting post-install script ..." +# copy configuration files +if [[ ! -f ${HC_ETC_DIR}/core/check_health.conf ]] +then + # copy main configuration file + cp -p ${HC_ETC_DIR}/core/check_health.conf.dist ${HC_ETC_DIR}/core/check_health.conf >/dev/null + (( $? == 0 )) || \ + { + echo "ERROR: could not copy main config file in ${HC_ETC_DIR}/core" + exit 1 + } +fi +if [[ ! -f ${HC_ETC_DIR}/check_host.conf ]] +then + # copy host check configuration file + cp -p ${HC_ETC_DIR}/check_host.conf.dist ${HC_ETC_DIR}/check_host.conf >/dev/null + (( $? == 0 )) || \ + { + echo "ERROR: could not copy host check config file in ${HC_ETC_DIR}" + exit 1 + } +fi +# refresh symbolic FPATH links for core includes & plugins +if [[ -x ${HC_BIN} ]] +then + ${HC_BIN} --fix-symlinks || echo "WARN: updating symlinks failed" +else + echo "ERROR: could not locate or excute the HC main script (${HC_BIN})" +fi +echo "INFO: finished post-install script" diff --git a/build/linux/DEBIAN/hc-linux/postrm b/build/linux/DEBIAN/hc-linux/postrm new file mode 100644 index 0000000..f36c613 --- /dev/null +++ b/build/linux/DEBIAN/hc-linux/postrm @@ -0,0 +1,42 @@ +#!/bin/bash +# ------------------------- CONFIGURATION starts here ------------------------- +# location of the HC scripts +HC_DIR="/opt/hc" +# location of the HC configuration files +HC_ETC_DIR="/etc/opt/hc" +# location of the HC log/state files +HC_VAR_DIR="/var/opt/hc" +# ------------------------- CONFIGURATION ends here --------------------------- +# update or uninstall? +if (( $1 == 0 )) +then + echo "INFO: starting post-uninstall script ..." + if [[ -d ${HC_DIR} ]] + then + rm -rf ${HC_DIR} 2>/dev/null + (( $? == 0 )) || echo "WARN: failed to remove ${HC_DIR}" + fi + if [[ -d ${HC_ETC_DIR} ]] + then + rm -rf ${HC_ETC_DIR}/*.dist >/dev/null + (( $? == 0 )) || echo "WARN: could not remove .dist files in directory ${HC_ETC_DIR}" + fi + if [[ -d ${HC_ETC_DIR}/core ]] + then + rm -rf ${HC_ETC_DIR}/core/*.dist >/dev/null + (( $? == 0 )) || echo "WARN: could not remove .dist files in directory ${HC_ETC_DIR}/core" + fi + if [[ -d ${HC_ETC_DIR}/core/providers ]] + then + rm -rf ${HC_ETC_DIR}/core/providers/*.dist >/dev/null + (( $? == 0 )) || echo "WARN: could not remove .dist files in directory ${HC_ETC_DIR}/core/providers" + fi + if [[ -d ${HC_VAR_DIR} ]] + then + rm -rf ${HC_VAR_DIR}/state/temporary 2>/dev/null + (( $? == 0 )) || echo "WARN: failed to remove ${HC_VAR_DIR}/state/temporary" + fi + echo "INFO: finished post-uninstall script" +else + echo "INFO: skipping post-uninstall script (RPM upgrade)" +fi diff --git a/build/linux/DEBIAN/hc-notify-eif/conffiles b/build/linux/DEBIAN/hc-notify-eif/conffiles new file mode 100644 index 0000000..33918b9 --- /dev/null +++ b/build/linux/DEBIAN/hc-notify-eif/conffiles @@ -0,0 +1 @@ +/etc/opt/hc/core/providers/notify_eif.conf diff --git a/build/linux/DEBIAN/hc-notify-eif/control b/build/linux/DEBIAN/hc-notify-eif/control new file mode 100644 index 0000000..cdba34b --- /dev/null +++ b/build/linux/DEBIAN/hc-notify-eif/control @@ -0,0 +1,11 @@ +Package: hc-notify-eif +Version: %BUILD_DATE% +Architecture: all +Maintainer: Patrick Van der Veken +Essential: no +Installed-Size: 50 +Depends: hc-linux +Section: tools +Priority: extra +Description: The KUDOS Health Checker (HC) for UNIX (EIF notify core plugin). The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as +well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc. This package contains core plugins (notify). diff --git a/build/linux/DEBIAN/hc-notify-eif/postinst b/build/linux/DEBIAN/hc-notify-eif/postinst new file mode 100755 index 0000000..38317f1 --- /dev/null +++ b/build/linux/DEBIAN/hc-notify-eif/postinst @@ -0,0 +1,26 @@ +#!/bin/bash +# ------------------------- CONFIGURATION starts here ------------------------- +# location of the HC configuration files +HC_ETC_DIR="/etc/opt/hc" +# location of check_health.sh +HC_BIN="/opt/hc/bin/check_health.sh" +PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" +# ------------------------- CONFIGURATION ends here --------------------------- +echo "INFO: starting post-install script ..." +# copy plugin configuration file +if [[ ! -f ${HC_ETC_DIR}/core/providers/notify_eif.conf ]] +then + cp -p ${HC_ETC_DIR}/core/providers/notify_eif.conf.dist ${HC_ETC_DIR}/core/providers/notify_eif.conf >/dev/null + (( $? == 0 )) || \ + { + echo "ERROR: could not copy plugin config file in ${HC_ETC_DIR}/core/providers" + exit 1 + } +fi +# refresh symbolic FPATH links +if [[ -x ${HC_BIN} ]] +then + ${HC_BIN} --fix-symlinks + (( $? == 0 )) || echo "WARN: updating symlinks failed" +fi +echo "INFO: finished post-install script" \ No newline at end of file diff --git a/build/linux/DEBIAN/hc-notify-eif/postrm b/build/linux/DEBIAN/hc-notify-eif/postrm new file mode 100755 index 0000000..408b512 --- /dev/null +++ b/build/linux/DEBIAN/hc-notify-eif/postrm @@ -0,0 +1,32 @@ +#!/bin/bash +# ------------------------- CONFIGURATION starts here ------------------------- +# location of the HC configuration files +HC_ETC_DIR="/etc/opt/hc" +# location of check_health.sh +HC_BIN="/opt/hc/bin/check_health.sh" +PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" +# ------------------------- CONFIGURATION ends here --------------------------- +# update or uninstall? +if (( $1 == 0 )) +then + echo "INFO: starting post-uninstall script ..." + # copy plugin configuration file (.dist only) + if [[ -d ${HC_ETC_DIR}/core/providers ]] + then + rm -f ${HC_ETC_DIR}/core/providers/notify_eif.conf.dist 2>/dev/null + (( $? == 0 )) || \ + { + echo "ERROR: could not remove plugin config file in ${HC_ETC_DIR}/core/providers" + exit 1 + } + fi +else + echo "INFO: starting post-uninstall script (RPM upgrade)" +fi +# refresh symbolic FPATH links +if [[ -x ${HC_BIN} ]] +then + ${HC_BIN} --fix-symlinks + (( $? == 0 )) || echo "WARN: updating symlinks failed" +fi +echo "INFO: finished post-uninstall script" \ No newline at end of file diff --git a/build/linux/DEBIAN/hc-notify-sms/conffiles b/build/linux/DEBIAN/hc-notify-sms/conffiles new file mode 100644 index 0000000..a684128 --- /dev/null +++ b/build/linux/DEBIAN/hc-notify-sms/conffiles @@ -0,0 +1 @@ +/etc/opt/hc/core/providers/notify_sms.conf diff --git a/build/linux/DEBIAN/hc-notify-sms/control b/build/linux/DEBIAN/hc-notify-sms/control new file mode 100644 index 0000000..57ad365 --- /dev/null +++ b/build/linux/DEBIAN/hc-notify-sms/control @@ -0,0 +1,11 @@ +Package: hc-notify-sms +Version: %BUILD_DATE% +Architecture: all +Maintainer: Patrick Van der Veken +Essential: no +Installed-Size: 50 +Depends: hc-linux +Section: tools +Priority: extra +Description: The KUDOS Health Checker (HC) for UNIX (SMS notify core plugin). The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as +well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc. This package contains core plugins (notify). diff --git a/build/linux/DEBIAN/hc-notify-sms/postinst b/build/linux/DEBIAN/hc-notify-sms/postinst new file mode 100755 index 0000000..458571b --- /dev/null +++ b/build/linux/DEBIAN/hc-notify-sms/postinst @@ -0,0 +1,26 @@ +#!/bin/bash +# ------------------------- CONFIGURATION starts here ------------------------- +# location of the HC configuration files +HC_ETC_DIR="/etc/opt/hc" +# location of check_health.sh +HC_BIN="/opt/hc/bin/check_health.sh" +PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" +# ------------------------- CONFIGURATION ends here --------------------------- +echo "INFO: starting post-install script ..." +# copy plugin configuration file +if [[ ! -f ${HC_ETC_DIR}/core/providers/notify_sms.conf ]] +then + cp -p ${HC_ETC_DIR}/core/providers/notify_sms.conf.dist ${HC_ETC_DIR}/core/providers/notify_sms.conf >/dev/null + (( $? == 0 )) || \ + { + echo "ERROR: could not copy plugin config file in ${HC_ETC_DIR}/core/providers" + exit 1 + } +fi +# refresh symbolic FPATH links +if [[ -x ${HC_BIN} ]] +then + ${HC_BIN} --fix-symlinks + (( $? == 0 )) || echo "WARN: updating symlinks failed" +fi +echo "INFO: finished post-install script" \ No newline at end of file diff --git a/build/linux/DEBIAN/hc-notify-sms/postrm b/build/linux/DEBIAN/hc-notify-sms/postrm new file mode 100755 index 0000000..6264a26 --- /dev/null +++ b/build/linux/DEBIAN/hc-notify-sms/postrm @@ -0,0 +1,32 @@ +#!/bin/bash +# ------------------------- CONFIGURATION starts here ------------------------- +# location of the HC configuration files +HC_ETC_DIR="/etc/opt/hc" +# location of check_health.sh +HC_BIN="/opt/hc/bin/check_health.sh" +PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" +# ------------------------- CONFIGURATION ends here --------------------------- +# update or uninstall? +if (( $1 == 0 )) +then + echo "INFO: starting post-uninstall script ..." + # copy plugin configuration file (.dist only) + if [[ -d ${HC_ETC_DIR}/core/providers ]] + then + rm -f ${HC_ETC_DIR}/core/providers/notify_sms.conf.dist 2>/dev/null + (( $? == 0 )) || \ + { + echo "ERROR: could not remove plugin config file in ${HC_ETC_DIR}/core/providers" + exit 1 + } + fi +else + echo "INFO: starting post-uninstall script (RPM upgrade)" +fi +# refresh symbolic FPATH links +if [[ -x ${HC_BIN} ]] +then + ${HC_BIN} --fix-symlinks + (( $? == 0 )) || echo "WARN: updating symlinks failed" +fi +echo "INFO: finished post-uninstall script" \ No newline at end of file diff --git a/build/linux/SPECS/hc-kudos.spec b/build/linux/SPECS/hc-kudos.spec deleted file mode 100644 index 845ba3c..0000000 --- a/build/linux/SPECS/hc-kudos.spec +++ /dev/null @@ -1,76 +0,0 @@ -%define build_timestamp %(date +"%Y%m%d") - -Name: hc-kudos -Version: %{build_timestamp} -Release: 1 - -Summary: The KUDOS Health Checker (HC) for UNIX (KUDOS plugins) -Group: Tools/Monitoring - -License: GNU General Public License either version 2 of the License, or (at your option) any later version -URL: http://www.kudos.be - -Requires: ksh,hc-linux -BuildArch: noarch -BuildRoot: %{_topdir}/%{name}-%{version}-root - -%description -The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc. -This package contains the KUDOS specific plugins. - -%prep - -%build - -%install -rm -rf $RPM_BUILD_ROOT -install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib -install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/customer -install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/customer/kudos -cp ../SOURCES/lib/customer/kudos/check_kudos_kapow_credits.sh $RPM_BUILD_ROOT/opt/hc/lib/customer/kudos/check_kudos_kapow_credits.sh -install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc -cp ../SOURCES/etc/check_kudos_kapow_credits.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_kudos_kapow_credits.conf.dist - - -%post -# ------------------------- CONFIGURATION starts here ------------------------- -# location of check_health.sh -HC_BIN="/opt/hc/bin/check_health.sh" -PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" -# ------------------------- CONFIGURATION ends here --------------------------- -echo "INFO: starting post-install script ..." -# refresh symbolic FPATH links -if [[ -x ${HC_BIN} ]] -then - ${HC_BIN} --fix-symlinks - (( $? == 0 )) || echo "WARN: updating symlinks failed" -fi -echo "INFO: finished post-install script" - -%postun -# ------------------------- CONFIGURATION starts here ------------------------- -# location of check_health.sh -HC_BIN="/opt/hc/bin/check_health.sh" -PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" -# ------------------------- CONFIGURATION ends here --------------------------- -echo "INFO: starting post-install script ..." -# refresh symbolic FPATH links -if [[ -x ${HC_BIN} ]] -then - ${HC_BIN} --fix-symlinks - (( $? == 0 )) || echo "WARN: updating symlinks failed" -fi -echo "INFO: finished post-install script" - -%files -%defattr(-,root,root,755) -%dir /opt/hc/lib -%dir /opt/hc/lib/customer -%dir /opt/hc/lib/customer/kudos -%attr(755, root, root) /opt/hc/lib/customer/kudos/check_kudos_kapow_credits.sh -%dir /etc/opt/hc -%attr(644, root, root) /etc/opt/hc/check_kudos_kapow_credits.conf.dist - -%changelog -* Fri Nov 11 2016 - 0.0.1 -- Initial build