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 /sysctl.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 'sysctl.bash')
| -rwxr-xr-x | sysctl.bash | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sysctl.bash b/sysctl.bash index b2c9b9c..fcbadb2 100755 --- a/sysctl.bash +++ b/sysctl.bash @@ -1,8 +1,30 @@ #!/bin/bash +sudo sysctl --system + +sudo mkinitcpio -P + +sudo systemctl daemon-reload + systemctl --user enable gnome-keyring-daemon.socket systemctl --user enable ssh-agent.socket sudo systemctl enable keyd.service sudo systemctl enable proton.VPN.service sudo systemctl enable snapper-cleanup.timer sudo systemctl enable snapper-timeline.timer + +# fail2ban +sudo systemctl enable --now fail2ban + +# fs trim +sudo systemctl enable --now fstrim.timer + +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 |
