-
-
Notifications
You must be signed in to change notification settings - Fork 267
/
cron
28 lines (20 loc) · 562 Bytes
/
cron
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function f_cron {
echo "[$SCRIPT_COUNT] /etc/cron and /etc/at"
rm /etc/cron.deny 2> /dev/null
rm /etc/at.deny 2> /dev/null
echo 'root' > /etc/cron.allow
echo 'root' > /etc/at.allow
chown root:root /etc/cron*
chmod og-rwx /etc/cron*
chown root:root /etc/at*
chmod og-rwx /etc/at*
systemctl mask atd.service
systemctl stop atd.service
systemctl daemon-reload
sed -i 's/^#cron./cron./' /etc/rsyslog.d/50-default.conf
if [[ $VERBOSE == "Y" ]]; then
systemctl status atd.service --no-pager
echo
fi
((SCRIPT_COUNT++))
}