blob: fcbadb2f503aac0e5c18f13eb362147f57bb222a (
plain)
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
29
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
|