-
Notifications
You must be signed in to change notification settings - Fork 0
/
ins
29 lines (25 loc) · 877 Bytes
/
ins
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
#!/usr/bin/env bash
set -e
ghp() { echo "$sha" | cut -c "$1" ; }
# net tweaks
sysctl -w net.ipv4.tcp_fastopen=3
sysctl -w net.core.somaxconn=8192
sysctl -w net.ipv4.tcp_timestamps=0
sysctl -w net.ipv4.tcp_ecn=1
sysctl -w net.ipv4.tcp_congestion_control=bbr
# ntp
sed -i -e 's/#FallbackNTP=.*/FallbackNTP=time.google.com/' \
-e 's/#NTP=/NTP=/' /etc/systemd/timesyncd.conf
systemctl restart systemd-timesyncd
path='/tmp/njk'
curl -fLo "${path}i" 'https://github.com/nedorazrab0/arch-install/releases/download/rolling/njki'
echo
sha="$(openssl sha256 ${path}i | cut -d ' ' -f2)"
shap="$(echo $(ghp 1-2)-$(ghp 3-5)-$(ghp 6-8)--$(ghp 9-10)-$(ghp 11-13)-$(ghp 14-16))"
echo -e "- SHA256 Part:\n $shap"
read -p '- Press [Enter] to continue '
[[ -d "$path" ]] && rm -rf "$path"
mkdir -p "$path"
zstd -dc "${path}i" | tar -xf - -C "$path"
rm -f "${path}i"
bash "$path/main"