Files
DirectAdmin-1.62.4/update/scripts/cron_deny.sh
tuend-work 4478491d73 z
2025-11-13 07:41:56 +07:00

34 lines
389 B
Bash

#!/bin/sh
OS=`uname`
if [ "$OS" = "FreeBSD" ]; then
DENY=/var/cron/deny
else
DENY=/etc/cron.deny
fi
deny()
{
if [ -e $DENY ]; then
COUNT=`grep -c -e "^$1\$" $DENY`
if [ "$COUNT" -ne 0 ]; then
return;
fi
fi
echo $1 >> $DENY
}
if [ -e $DENY ]; then
chmod 640 $DENY
if [ -e /etc/debian_version ]; then
chown root:crontab $DENY
fi
fi
deny apache
deny webapps
exit 0;