diff options
| author | Denis Chevalier <perso@denischevalier.fr> | 2026-08-06 13:48:44 +0200 |
|---|---|---|
| committer | Denis Chevalier <perso@denischevalier.fr> | 2026-08-06 13:48:44 +0200 |
| commit | b57ec8c0e56015553c468e7282905fa8582632ba (patch) | |
| tree | 9638912e5a543adfe7071e2290d24ba0a1bbe8d8 /etc.bash | |
| parent | a7980241878abfe57dc8d85ca63a18c6db690aa7 (diff) | |
| download | postinstall-b57ec8c0e56015553c468e7282905fa8582632ba.tar.gz postinstall-b57ec8c0e56015553c468e7282905fa8582632ba.tar.bz2 postinstall-b57ec8c0e56015553c468e7282905fa8582632ba.zip | |
move sysctl, mkinitcpio and systemctl commands to sysctl.bash
Diffstat (limited to 'etc.bash')
| -rwxr-xr-x | etc.bash | 18 |
1 files changed, 0 insertions, 18 deletions
@@ -11,7 +11,6 @@ sudo cp -v ./etc/updatedb.conf /etc/ sudo cp -v ./etc/sudoers.d/00-hardening /etc/sudoers.d/ sudo cp -v ./etc/systemd/coredump.conf /etc/systemd/ sudo cp -v ./etc/sysctl.d/99-security.conf /etc/sysctl.d/ -sudo sysctl --system grep tmpfs /etc/fstab || sudo cat ./etc/fstab >> /etc/fstab @@ -27,14 +26,9 @@ sudo systemctl enable --now ufw # fail2ban sudo cp -v ./etc/fail2ban/jail.d/sshd.conf /etc/fail2ban/jail.d/ -sudo systemctl enable --now fail2ban - -# fs trim -sudo systemctl enable --now fstrim.timer # linux-hardened sudo cp -v ./etc/mkinitcpio.d/linux-hardened.preset /etc/mkinitcpio.d -sudo mkinitcpio -P # harden systemd services echo "==> Creating drop-in override directories..." @@ -50,15 +44,3 @@ sudo cp -v ./etc/systemd/system/fail2ban.service.d/override.conf /etc/systemd/sy echo "==> Applying cups.service hardening..." sudo cp -v ./etc/systemd/system/cups.service.d/override.conf /etc/systemd/system/cups.service.d/ - -sudo systemctl daemon-reload - -echo "==> Restarting services..." -for svc in sshd fail2ban cups; do - if systemctl is-active --quiet "$svc"; then - echo " Restarting active service: $svc" - sudo systemctl restart "$svc" - else - echo " Skipping restart for inactive service: $svc" - fi -done |
