diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2024-07-07 01:36:45 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2024-07-07 01:36:45 +0900 |
| commit | f55c2c24737d295f87637245089a3a9d60fdf0a0 (patch) | |
| tree | a9ac07dc230e5ff491b95dc4f446c4b03ad4a8ff | |
| parent | 640999eb2e66c5bfb81d0e18a43beddd4ace7b0e (diff) | |
Init
| -rwxr-xr-x | public/thesiah.sh | 24 | ||||
| -rwxr-xr-x | static/thesiah.sh | 24 |
2 files changed, 26 insertions, 22 deletions
diff --git a/public/thesiah.sh b/public/thesiah.sh index 7bf3cbd..2e58341 100755 --- a/public/thesiah.sh +++ b/public/thesiah.sh @@ -98,10 +98,10 @@ adduserandpass() { "/home/$name/Torrent/incomplete" \ "/media/flash" \ "/mnt/second" \ - "/home/$name" && chown -R "$name":wheel /home/"$name" >/dev/null 2>&1 + "/home/$name" && chown -R "$name":wheel /home/"$name" export repodir="/home/$name/.local/src" mkdir -p "$repodir" - chown -R "$name":wheel "$(dirname "$repodir")" >/dev/null 2>&1 + chown -R "$name":wheel "$(dirname "$repodir")" echo "$name:$pass1" | chpasswd unset pass1 pass2 } @@ -215,9 +215,9 @@ installationloop() { comment="$(echo "$comment" | sed -E "s/(^\"|\"$)//g")" case "$tag" in "A") aurinstall "$program" "$comment" ;; + "I") initinstall "$program" "$comment" ;; "G") gitmakeinstall "$program" "$comment" ;; "P") pipinstall "$program" "$comment" ;; - "I") initinstall "$program" "$comment" ;; *) maininstall "$program" "$comment" ;; esac done </tmp/progs.csv @@ -242,6 +242,7 @@ vimplugininstall() { mkdir -p "/home/$name/.config/vim/autoload" curl -Ls "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" >"/home/$name/.config/vim/autoload/plug.vim" chown -R "$name:wheel" "/home/$name/.config/vim" + NVIM_APPNAME=TheSiahxyz nvim --headless "+Lazy! sync" +qa } makeuserjs() { @@ -363,8 +364,8 @@ ufwsetup() { [ -x "$(command -v "ufw")" ] || installpkg ufw pacman -Qq ufw-"$initsys" >/dev/null 2>&1 || installpkg ufw-"$initsys" sleep 1 + ufw --force reload >/dev/null 2>&1 ufw default deny incoming >/dev/null 2>&1 - sleep 1 ufw allow 80 >/dev/null 2>&1 ufw allow 443 >/dev/null 2>&1 ufw allow 25/tcp >/dev/null 2>&1 @@ -379,7 +380,6 @@ ufwsetup() { ufw allow in 'WWW Full' >/dev/null 2>&1 ufw allow in 'Postfix SMTPS' >/dev/null 2>&1 ufw allow in 'Mail Submission' >/dev/null 2>&1 - sleep 1 ufw enable >/dev/null 2>&1 || ufw --force enable >/dev/null 2>&1 sleep 1 case "$initsys" in @@ -406,6 +406,7 @@ sambasetup() { [ -x "$(command -v "samba")" ] || installpkg samba pacman -Qq samba-"$initsys" >/dev/null 2>&1 || installpkg samba-"$initsys" sleep 1 + ufw --force reload >/dev/null 2>&1 ufw allow 137/tcp >/dev/null 2>&1 ufw allow 137/udp >/dev/null 2>&1 ufw allow 138/tcp >/dev/null 2>&1 @@ -451,7 +452,7 @@ bluezsetup() { whiptail --infobox "Setting up bluetooth..." 7 50 pacman -Qq bluez >/dev/null 2>&1 || installpkg bluez pacman -Qq bluez-"$initsys" >/dev/null 2>&1 || installpkg bluez-"$initsys" - sleep 1 + sleep 3 case "$initsys" in "runit") ln -sf /etc/runit/sv/bluetoothd /run/runit/service/ >/dev/null 2>&1 @@ -538,7 +539,7 @@ sshsetup() { [ -x "$(command -v "ssh")" ] || installpkg openssh pacman -Qq openssh-"$initsys" >/dev/null 2>&1 || installpkg openssh-"$initsys" sleep 1 - sed -Ei "s/^#?(PasswordAuthentication).*/\1 no;s/^#?(UsePAM).*/\1 no" /etc/ssh/sshd_config + sed -Ei "s/^#?(PasswordAuthentication).*/\1 no/;s/^#?(UsePAM).*/\1 no/" /etc/ssh/sshd_config case "$initsys" in "runit") ln -sf /etc/runit/sv/sshd /run/runit/service/ >/dev/null 2>&1 @@ -563,8 +564,8 @@ vpnsetup() { [ -x "$(command -v "openvpn")" ] || installpkg openvpn pacman -Qq openvpn-"$initsys" >/dev/null 2>&1 || installpkg openvpn-"$initsys" pacman -Qq networkmanager-openvpn >/dev/null 2>&1 || installpkg networkmanager-openvpn - sleep 1 - nmcli connection import type openvpn file /home/"$name"/.dotfiles/.config/openvpn/thesiah.ovpn >/dev/null 2>&1 + sleep 3 + nmcli connection import type openvpn file /home/"$name"/.dotfiles/ar/.config/openvpn/thesiah.ovpn >/dev/null 2>&1 } elogindsetup() { @@ -575,6 +576,7 @@ HandleLidSwitchExternalPower=ignore HandleLidSwitchDocked=ignore LidSwitchIgnoreInhibited=no' > /etc/elogind/logind.conf.d/00-lid.conf 2>/dev/null ln -sf /etc/runit/sv/elogind /run/runit/service/ + sleep 1 sv start elogind || sv force-reload elogind >/dev/null 2>&1 } @@ -608,7 +610,7 @@ microsetup() { } finalize() { - ln -s /home/"$name"/.dotfiles/Pictures/wallpaper/bg.png /home/"$name"/.local/share/bg + ln -sf /home/"$name"/.dotfiles/default/Pictures/wallpaper/bg.png /home/"$name"/.local/share/bg chown -h "$name":wheel /home/"$name"/.local/share/bg # Farewell whiptail --title "All done!" \ @@ -797,7 +799,7 @@ librewolfsetup || error "Failed to set up librewolf." } # Make grub fast -sed -Ei "s/^(GRUB_GFXMODE=).*/\11024x768x8/;s/^(GRUB_TIMEOUT=).*/\15/;s/^(GRUB_TIMEOUT_STYLE=).*/\1hidden" /etc/default/grub +sed -Ei "s/^(GRUB_GFXMODE=).*/\11024x768x8/;s/^(GRUB_TIMEOUT=).*/\15/;s/^(GRUB_TIMEOUT_STYLE=).*/\1hidden/" /etc/default/grub grub-mkconfig -o /boot/grub/grub.cfg >/dev/null 2>&1 diff --git a/static/thesiah.sh b/static/thesiah.sh index 7bf3cbd..2e58341 100755 --- a/static/thesiah.sh +++ b/static/thesiah.sh @@ -98,10 +98,10 @@ adduserandpass() { "/home/$name/Torrent/incomplete" \ "/media/flash" \ "/mnt/second" \ - "/home/$name" && chown -R "$name":wheel /home/"$name" >/dev/null 2>&1 + "/home/$name" && chown -R "$name":wheel /home/"$name" export repodir="/home/$name/.local/src" mkdir -p "$repodir" - chown -R "$name":wheel "$(dirname "$repodir")" >/dev/null 2>&1 + chown -R "$name":wheel "$(dirname "$repodir")" echo "$name:$pass1" | chpasswd unset pass1 pass2 } @@ -215,9 +215,9 @@ installationloop() { comment="$(echo "$comment" | sed -E "s/(^\"|\"$)//g")" case "$tag" in "A") aurinstall "$program" "$comment" ;; + "I") initinstall "$program" "$comment" ;; "G") gitmakeinstall "$program" "$comment" ;; "P") pipinstall "$program" "$comment" ;; - "I") initinstall "$program" "$comment" ;; *) maininstall "$program" "$comment" ;; esac done </tmp/progs.csv @@ -242,6 +242,7 @@ vimplugininstall() { mkdir -p "/home/$name/.config/vim/autoload" curl -Ls "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" >"/home/$name/.config/vim/autoload/plug.vim" chown -R "$name:wheel" "/home/$name/.config/vim" + NVIM_APPNAME=TheSiahxyz nvim --headless "+Lazy! sync" +qa } makeuserjs() { @@ -363,8 +364,8 @@ ufwsetup() { [ -x "$(command -v "ufw")" ] || installpkg ufw pacman -Qq ufw-"$initsys" >/dev/null 2>&1 || installpkg ufw-"$initsys" sleep 1 + ufw --force reload >/dev/null 2>&1 ufw default deny incoming >/dev/null 2>&1 - sleep 1 ufw allow 80 >/dev/null 2>&1 ufw allow 443 >/dev/null 2>&1 ufw allow 25/tcp >/dev/null 2>&1 @@ -379,7 +380,6 @@ ufwsetup() { ufw allow in 'WWW Full' >/dev/null 2>&1 ufw allow in 'Postfix SMTPS' >/dev/null 2>&1 ufw allow in 'Mail Submission' >/dev/null 2>&1 - sleep 1 ufw enable >/dev/null 2>&1 || ufw --force enable >/dev/null 2>&1 sleep 1 case "$initsys" in @@ -406,6 +406,7 @@ sambasetup() { [ -x "$(command -v "samba")" ] || installpkg samba pacman -Qq samba-"$initsys" >/dev/null 2>&1 || installpkg samba-"$initsys" sleep 1 + ufw --force reload >/dev/null 2>&1 ufw allow 137/tcp >/dev/null 2>&1 ufw allow 137/udp >/dev/null 2>&1 ufw allow 138/tcp >/dev/null 2>&1 @@ -451,7 +452,7 @@ bluezsetup() { whiptail --infobox "Setting up bluetooth..." 7 50 pacman -Qq bluez >/dev/null 2>&1 || installpkg bluez pacman -Qq bluez-"$initsys" >/dev/null 2>&1 || installpkg bluez-"$initsys" - sleep 1 + sleep 3 case "$initsys" in "runit") ln -sf /etc/runit/sv/bluetoothd /run/runit/service/ >/dev/null 2>&1 @@ -538,7 +539,7 @@ sshsetup() { [ -x "$(command -v "ssh")" ] || installpkg openssh pacman -Qq openssh-"$initsys" >/dev/null 2>&1 || installpkg openssh-"$initsys" sleep 1 - sed -Ei "s/^#?(PasswordAuthentication).*/\1 no;s/^#?(UsePAM).*/\1 no" /etc/ssh/sshd_config + sed -Ei "s/^#?(PasswordAuthentication).*/\1 no/;s/^#?(UsePAM).*/\1 no/" /etc/ssh/sshd_config case "$initsys" in "runit") ln -sf /etc/runit/sv/sshd /run/runit/service/ >/dev/null 2>&1 @@ -563,8 +564,8 @@ vpnsetup() { [ -x "$(command -v "openvpn")" ] || installpkg openvpn pacman -Qq openvpn-"$initsys" >/dev/null 2>&1 || installpkg openvpn-"$initsys" pacman -Qq networkmanager-openvpn >/dev/null 2>&1 || installpkg networkmanager-openvpn - sleep 1 - nmcli connection import type openvpn file /home/"$name"/.dotfiles/.config/openvpn/thesiah.ovpn >/dev/null 2>&1 + sleep 3 + nmcli connection import type openvpn file /home/"$name"/.dotfiles/ar/.config/openvpn/thesiah.ovpn >/dev/null 2>&1 } elogindsetup() { @@ -575,6 +576,7 @@ HandleLidSwitchExternalPower=ignore HandleLidSwitchDocked=ignore LidSwitchIgnoreInhibited=no' > /etc/elogind/logind.conf.d/00-lid.conf 2>/dev/null ln -sf /etc/runit/sv/elogind /run/runit/service/ + sleep 1 sv start elogind || sv force-reload elogind >/dev/null 2>&1 } @@ -608,7 +610,7 @@ microsetup() { } finalize() { - ln -s /home/"$name"/.dotfiles/Pictures/wallpaper/bg.png /home/"$name"/.local/share/bg + ln -sf /home/"$name"/.dotfiles/default/Pictures/wallpaper/bg.png /home/"$name"/.local/share/bg chown -h "$name":wheel /home/"$name"/.local/share/bg # Farewell whiptail --title "All done!" \ @@ -797,7 +799,7 @@ librewolfsetup || error "Failed to set up librewolf." } # Make grub fast -sed -Ei "s/^(GRUB_GFXMODE=).*/\11024x768x8/;s/^(GRUB_TIMEOUT=).*/\15/;s/^(GRUB_TIMEOUT_STYLE=).*/\1hidden" /etc/default/grub +sed -Ei "s/^(GRUB_GFXMODE=).*/\11024x768x8/;s/^(GRUB_TIMEOUT=).*/\15/;s/^(GRUB_TIMEOUT_STYLE=).*/\1hidden/" /etc/default/grub grub-mkconfig -o /boot/grub/grub.cfg >/dev/null 2>&1 |
