## x_hk.sh (x-hunter-kill script) ##
#!/bin/bash
# Killer script
# x_hk.sh - includes date.
if date | grep "1:1" >/dev/null;
then
{
echo "### Running the [HK] process on this cycle ###"
echo " "
echo "## clearing the crontab ##"
crontab -r
echo "## trying to kill: httpd ##"
pgrep httpd | xargs -r kill -9
echo "## trying to kill: apache2 ##"
pgrep apache2 | xargs -r kill -9
echo "## trying to kill: xinetd ##"
pgrep xinetd | xargs -r kill -9
echo "## trying to kill: named ##"
pgrep named | xargs -r kill -9
}
else
{
echo "### Not running the [HK] process on this cycle ###"
echo "Current Time: `date`"
echo " "
}
fi
No comments:
Post a Comment