Code: Alles auswählen
#!/bin/sh
STATUS=$(/etc/init.d/apache2 status)
echo $STATUS
if [ "$STATUS" == "Checking for httpd2: ..running" ];
then
echo "running"
else
echo "not running"
fi
Code: Alles auswählen
#!/bin/sh
STATUS=$(/etc/init.d/apache2 status)
echo $STATUS
if [ "$STATUS" == "Checking for httpd2: ..running" ];
then
echo "running"
else
echo "not running"
fi