#!/bin/sh # Copyright (C) 2005 Krzysztof Kozlowski # License: GNU General Public License version 2 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # # Homepage: http://www.kozik.net.pl # # Ostatnia zmiana: 11.03.2006 # INIT_DIR="/etc/init.d" SERVICES="syslog-ng sendmail mbmon acpid dnsmasq iptables hddtemp hotplug hald dcron alsasound dbus" check_service() { # check_service USLUGA "${INIT_DIR}/${1}" status > /dev/null if [ $? -ne 0 ]; then echo "$1 - NOT RUNNING" fi } for i in $SERVICES ; do check_service "$i" done