added change hostname and boot to CLI options

This commit is contained in:
Yuriy 2024-07-06 17:12:43 -04:00
parent 6e9f1e2975
commit 8b3204518f

View File

@ -38,6 +38,7 @@ yadResults=$(yad \
--field 'Export pkgs to List':chk \ --field 'Export pkgs to List':chk \
--field '-':chk \ --field '-':chk \
--field Configuration:LBL \ --field Configuration:LBL \
--field 'Change Hostname':chk \
--field "sudo Timeout:chk" \ --field "sudo Timeout:chk" \
--field "Grub Timeout:chk" \ --field "Grub Timeout:chk" \
--field Konsave:chk \ --field Konsave:chk \
@ -45,8 +46,8 @@ yadResults=$(yad \
--field 'Disable Connectivity Check':chk \ --field 'Disable Connectivity Check':chk \
--field "Updater to Desktop:chk" \ --field "Updater to Desktop:chk" \
--field "Enable SSH:chk" \ --field "Enable SSH:chk" \
--field '':chk \
--field "Custom .bashrc:chk" \ --field "Custom .bashrc:chk" \
--field "Boot to CLI:chk" \
--field "Reboot:chk" \ --field "Reboot:chk" \
--field '-':LBL \ --field '-':LBL \
--field '-':LBL \ --field '-':LBL \
@ -162,9 +163,12 @@ if [[ $index -eq 9 ]] && [[ $i == *"TRUE"* ]]; then
echo "empty here" echo "empty here"
fi fi
if [[ $index -eq 14 ]] && [[ $i == *"TRUE"* ]]; then if [[ $index -eq 14 ]] && [[ $i == *"TRUE"* ]]; then
echo "Changing Hostname"
hostnamectl set-hostname
fi
if [[ $index -eq 15 ]] && [[ $i == *"TRUE"* ]]; then
echo "Changing sudo timeout" echo "Changing sudo timeout"
echo "Paste the following into the editor:" echo "Paste the following into the editor:"
konsole --hold -e echo "Defaults env_reset,timestamp_timeout=30" ; sudo visudo konsole --hold -e echo "Defaults env_reset,timestamp_timeout=30" ; sudo visudo
@ -173,7 +177,7 @@ if [[ $index -eq 14 ]] && [[ $i == *"TRUE"* ]]; then
fi fi
if [[ $index -eq 15 ]] && [[ $i == *"TRUE"* ]]; then if [[ $index -eq 16 ]] && [[ $i == *"TRUE"* ]]; then
echo "Changing GRUB timeout" echo "Changing GRUB timeout"
sudo nano /etc/default/grub sudo nano /etc/default/grub
sudo grub-mkconfig -o /boot/grub/grub.cfg sudo grub-mkconfig -o /boot/grub/grub.cfg
@ -181,7 +185,7 @@ fi
if [[ $index -eq 16 ]] && [[ $i == *"TRUE"* ]]; then if [[ $index -eq 17 ]] && [[ $i == *"TRUE"* ]]; then
echo "Installing Konsave" echo "Installing Konsave"
pacman -Sy ; paru -S konsave --noconfirm pacman -Sy ; paru -S konsave --noconfirm
@ -198,7 +202,7 @@ fi
if [[ $index -eq 17 ]] && [[ $i == *"TRUE"* ]]; then if [[ $index -eq 18 ]] && [[ $i == *"TRUE"* ]]; then
file="/etc/pacman.d/mirrorlist" file="/etc/pacman.d/mirrorlist"
string="http://10.0.0.108:7878" string="http://10.0.0.108:7878"
@ -210,7 +214,8 @@ if [[ $index -eq 17 ]] && [[ $i == *"TRUE"* ]]; then
fi fi
fi fi
if [[ $index -eq 18 ]] && [[ $i == *"TRUE"* ]]; then if [[ $index -eq 19 ]] && [[ $i == *"TRUE"* ]]; then
# https://wiki.archlinux.org/title/NetworkManager#Checking_connectivity
file="/etc/NetworkManager/conf.d/20-connectivity.conf" file="/etc/NetworkManager/conf.d/20-connectivity.conf"
string="enabled=false" string="enabled=false"
@ -224,24 +229,19 @@ if [[ $index -eq 18 ]] && [[ $i == *"TRUE"* ]]; then
fi fi
if [[ $index -eq 19 ]] && [[ $i == *"TRUE"* ]]; then if [[ $index -eq 20 ]] && [[ $i == *"TRUE"* ]]; then
echo "Adding Update Arch shortcut to desktop" echo "Adding Update Arch shortcut to desktop"
cd ~/Desktop/ ; wget -q -O Update_Arch.sh https://git.zinchuk.xyz/yuriy/linux-setup-script/raw/branch/main/Update_Arch_Linux.sh ; chmod +x Update_Arch.sh cd ~/Desktop/ ; wget -q -O Update_Arch.sh https://git.zinchuk.xyz/yuriy/linux-setup-script/raw/branch/main/Update_Arch_Linux.sh ; chmod +x Update_Arch.sh
fi fi
if [[ $index -eq 20 ]] && [[ $i == *"TRUE"* ]]; then if [[ $index -eq 21 ]] && [[ $i == *"TRUE"* ]]; then
echo "Enabling SSH Access" echo "Enabling SSH Access"
sudo systemctl enable sshd.service && sudo systemctl start sshd.service sudo systemctl enable sshd.service && sudo systemctl start sshd.service
fi fi
if [[ $index -eq 21 ]] && [[ $i == *"TRUE"* ]]; then
echo "Nothing Here"
fi
if [[ $index -eq 22 ]] && [[ $i == *"TRUE"* ]]; then if [[ $index -eq 22 ]] && [[ $i == *"TRUE"* ]]; then
echo "Custom Bashrc" echo "Custom Bashrc"
echo "Downloading and replacing .bashrc file" echo "Downloading and replacing .bashrc file"
@ -249,8 +249,13 @@ if [[ $index -eq 22 ]] && [[ $i == *"TRUE"* ]]; then
cd ~/ && wget -q -O .bashrc https://git.zinchuk.xyz/yuriy/Linux-bashrc-Profile/raw/branch/main/.bashrc && chmod 744 .bashrc cd ~/ && wget -q -O .bashrc https://git.zinchuk.xyz/yuriy/Linux-bashrc-Profile/raw/branch/main/.bashrc && chmod 744 .bashrc
fi fi
if [[ $index -eq 23 ]] && [[ $i == *"TRUE"* ]]; then if [[ $index -eq 23 ]] && [[ $i == *"TRUE"* ]]; then
echo "Changing System Boot to CLI"
sudo systemctl set-default multi-user.target
fi
if [[ $index -eq 24 ]] && [[ $i == *"TRUE"* ]]; then
echo "Rebooting System" echo "Rebooting System"
reboot reboot
fi fi