fix: adjust cron files and folder permissions
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2022-09-22 22:17:53 +02:00
parent b85da540b2
commit 933c33553d
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0

View File

@ -1,13 +1,13 @@
#!/bin/bash
set -eo pipefail
### Update system
### Updates system
echo '> Update packages ...'
dnf -yq update
dnf -q clean all
## Adjust Grub config
echo '> Adjust Grub config ...'
## Sets Grub config
echo '> Set grub config ...'
KERNEL_OPTIONS=(
'audit=1'
'audit_backlog_limit=8192'
@ -32,6 +32,16 @@ grubby --update-kernel=ALL --args="audit=1"
grubby --update-kernel=ALL --args="audit_backlog_limit=8192"
chmod 600 /boot/grub2/grub.cfg
### Sets cron permissions
echo '> Set cron permissions ...'
chmod 0700 /etc/cron.d
chmod 0700 /etc/cron.daily
chmod 0700 /etc/cron.hourly
chmod 0700 /etc/cron.monthly
chmod 0700 /etc/cron.weekly
chmod 0600 /etc/crontab
rm -rf /etc/cron.deny
### Cleans all audit logs
echo '> Cleaning all audit logs ...'
if [ -f /var/log/audit/audit.log ]; then