-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathFinal-Installation.sh
49 lines (37 loc) · 1.23 KB
/
Final-Installation.sh
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
USR=$(ls /home/)
{
echo "Final-Installation"
# Enable important services
systemctl enable acpid
systemctl enable ntpd
systemctl enable cronie
systemctl enable avahi-daemon
systemctl enable fstrim.timer
# Enable TLP
systemctl enable tlp.service
systemctl enable tlp-sleep.service
systemctl mask systemd-rfkill.service
systemctl mask systemd-rfkill.socket
# Enable UFW
systemctl enable ufw
ufw default deny
ufw enable
# Configure Keyboardlayout
localectl set-x11-keymap fr
# Enable auto login on tty1
mkdir -p /etc/systemd/system/[email protected]/
echo "[Service]" > /etc/systemd/system/[email protected]/override.conf
echo "ExecStart=" >> /etc/systemd/system/[email protected]/override.conf
echo "ExecStart=-/usr/bin/agetty --autologin $USR --noclear %I \$TERM" >> /etc/systemd/system/[email protected]/override.conf
# Lock root user
passwd -l root
# Finish Installation
echo "Finish!! You can remove /arch-setup/ to cleanup"
echo "Or you can install bloatwares /arch-setup/Bloat-Ware.sh"
read -p "First reboot is needed !! Press enter to reboot..."
# Pipe all output into log file
} |& tee -a /home/$USR/Arch-Installation.log
chown $USR:$USR /home/$USR/Arch-Installation.log
chmod 600 /home/$USR/Arch-Installation.log
reboot