added meshcentral install option and autostart file

This commit is contained in:
Yuriy 2023-12-16 00:13:49 -05:00
parent 8628593f05
commit bd32ea22fe
2 changed files with 94 additions and 78 deletions

View File

@ -9,10 +9,10 @@ if [[ $Argument == *"update"* ]]; then
# https://stackoverflow.com/questions/226703/how-do-i-prompt-for-yes-no-cancel-input-in-a-linux-shell-script
read -p "Do you wish to restart now? Y/N" yn
case $yn in
case $yn in
[Yy]* ) sudo reboot ;;
[Nn]* ) exit;;
esac
[Nn]* ) exit;;
esac
exit
fi
@ -21,44 +21,44 @@ fi
yadResults=$(yad \
--title="Linux Toolbox" \
--form --columns=3 \
--field Installations:LBL \
--field Debloat:chk \
--field paru:chk \
--field htop:chk \
--field nomachine:chk \
--field librewolf-bin:chk \
--field brave-bin:chk \
--field pacseek-bin:chk \
--field docker:chk \
--field docker-compose:chk \
--field 'Install pkgs from List':chk \
--field 'Export pkgs to List':chk \
--field Configuration:LBL \
--field "sudo Timeout:chk" \
--field "Grub Timeout:chk" \
--field Konsave:chk \
--field Flexo:chk \
--field "Check for Flexo:chk" \
--field "Updater to Desktop:chk" \
--field "Enable SSH:chk" \
--field "Reboot:chk" \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL )
--title="Linux Toolbox" \
--form --columns=3 \
--field Installations:LBL \
--field Debloat:chk \
--field paru:chk \
--field htop:chk \
--field MeshCentral:chk \
--field librewolf-bin:chk \
--field brave-bin:chk \
--field pacseek-bin:chk \
--field docker:chk \
--field docker-compose:chk \
--field 'Install pkgs from List':chk \
--field 'Export pkgs to List':chk \
--field Configuration:LBL \
--field "sudo Timeout:chk" \
--field "Grub Timeout:chk" \
--field Konsave:chk \
--field Flexo:chk \
--field "Check for Flexo:chk" \
--field "Updater to Desktop:chk" \
--field "Enable SSH:chk" \
--field "Reboot:chk" \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL \
--field '-':LBL )
@ -93,12 +93,12 @@ for i in "${SECTIONS[@]}"; do # access each element of array
if [[ $index -eq 1 ]]
if [[ $index -eq 1 ]]
then # DEBLOAT
if [[ $i == *"TRUE"* ]]; then
echo "Uninstalling EOS Extras: firewalld eos-update-notifier welcome eos-quickstart"
sudo pacman -R firewalld eos-update-notifier welcome eos-quickstart --noconfirm
fi
if [[ $i == *"TRUE"* ]]; then
echo "Uninstalling EOS Extras: firewalld eos-update-notifier welcome eos-quickstart"
sudo pacman -R firewalld eos-update-notifier welcome eos-quickstart --noconfirm
fi
fi
@ -121,9 +121,18 @@ fi
if [[ $index -eq 4 ]]
then
if [[ $i == *"TRUE"* ]]; then
echo "Installing NoMachine"
paru -S nomachine --noconfirm
fi
# install meshcentral agent
cd ~/Downloads/ ; wget --no-check-certificate -O meshagent "https://10.0.0.201/meshagents?id=%40FGwJAr%40pZPmGfuvJ1N1IpjOWl4USZc8k8XEE1xI4DEDzuWkJchGQHgbHBwrkuwB&installflags=0&meshinstall=6" ; chmod +x ./meshagent ; sudo ./meshagent -install
# update pacman database and install xorg
echo "Updating pacman cache and installing xorg-xhost"
sudo pacman -Sy ; sudo pacman -S xorg-xhost --noconfirm
# set xhost for this session
xhost +local:
echo "Adding xhost +local: to startup"
cd ~/.config/autostart ; wget -q -O xhost.desktop https://git.zinchuk.xyz/yuriy/linux-setup-script/raw/branch/main/xhost.desktop
fi
if [[ $index -eq 5 ]]
@ -154,16 +163,16 @@ fi
if [[ $index -eq 8 ]]
then
if [[ $i == *"TRUE"* ]]; then
echo "Installing and enabling Docker"
paru -S docker --noconfirm && sudo systemctl enable docker.service && sudo systemctl enable containerd.service
echo "Installing and enabling Docker"
paru -S docker --noconfirm && sudo systemctl enable docker.service && sudo systemctl enable containerd.service
fi
fi
if [[ $index -eq 9 ]]
then
if [[ $i == *"TRUE"* ]]; then
echo "Installing and enabling docker-compose"
paru -S docker-compose --noconfirm
echo "Installing and enabling docker-compose"
paru -S docker-compose --noconfirm
fi
fi
@ -171,10 +180,10 @@ fi
if [[ $index -eq 13 ]]
then
if [[ $i == *"TRUE"* ]]; then
echo "Changing sudo timeout"
echo "Paste the following into the editor:"
echo "Defaults env_reset,timestamp_timeout=30"
sudo visudo
echo "Changing sudo timeout"
echo "Paste the following into the editor:"
echo "Defaults env_reset,timestamp_timeout=30"
sudo visudo
fi
fi
@ -184,9 +193,9 @@ fi
if [[ $index -eq 14 ]]
then
if [[ $i == *"TRUE"* ]]; then
echo "Changing GRUB timeout"
sudo nano /etc/default/grub
sudo grub-mkconfig -o /boot/grub/grub.cfg
echo "Changing GRUB timeout"
sudo nano /etc/default/grub
sudo grub-mkconfig -o /boot/grub/grub.cfg
fi
fi
@ -194,9 +203,9 @@ fi
if [[ $index -eq 15 ]]
then
if [[ $i == *"TRUE"* ]]; then
echo "Installing Konsave and Importing Profile to terminal user"
paru -S konsave --noconfirm
cd ~/Downloads/ ; wget -q -O KonsaveTMPLT.knsv http://git.wmpco.biz/yuriy/Linux-Toolbox/raw/branch/main/KonsaveTMPLT.knsv
echo "Installing Konsave and Importing Profile to terminal user"
paru -S konsave --noconfirm
cd ~/Downloads/ ; wget -q -O KonsaveTMPLT.knsv http://git.wmpco.biz/yuriy/Linux-Toolbox/raw/branch/main/KonsaveTMPLT.knsv
# smbget smb://smb/Toolbox/Installs/Linux/KonsaveTMPLT.knsv -a
#konsave -i $PWD/KonsaveTMPLT.knsv -f
@ -206,14 +215,14 @@ then
paru -R konsave --noconfirm # uninstall konsave
# reboot
fi
fi
fi
if [[ $index -eq 16 ]]
then
if [[ $i == *"TRUE"* ]]; then
echo "Adding Flexo to mirrorlist"
echo 'Server = http://10.0.0.101:7878/$repo/os/$arch' | sudo tee -a /etc/pacman.d/mirrorlist
echo "Adding Flexo to mirrorlist"
echo 'Server = http://10.0.0.101:7878/$repo/os/$arch' | sudo tee -a /etc/pacman.d/mirrorlist
fi
fi
@ -226,18 +235,18 @@ then
if grep -q "$string" "$file"; then
echo "Flexo is in the mirrorlist. :)"
else
else
echo "FLEXO IP $string is not found in the mirrorlist file. Please consider adding it for faster updates."
fi
fi
fi
fi
fi
if [[ $index -eq 18 ]]
then
if [[ $i == *"TRUE"* ]]; then
echo "Adding Update Arch shortcut to desktop"
cd ~/Desktop/ ; wget -q -O Update_Arch.sh http://git.wmpco.biz/yuriy/Linux-Toolbox/raw/branch/main/Update_Arch_Linux.sh ; chmod +x Update_Arch.sh
echo "Adding Update Arch shortcut to desktop"
cd ~/Desktop/ ; wget -q -O Update_Arch.sh http://git.wmpco.biz/yuriy/Linux-Toolbox/raw/branch/main/Update_Arch_Linux.sh ; chmod +x Update_Arch.sh
fi
fi
@ -246,8 +255,8 @@ fi
if [[ $index -eq 19 ]]
then
if [[ $i == *"TRUE"* ]]; then
echo "Enabling SSH Access"
sudo systemctl enable sshd.service && sudo systemctl start sshd.service
echo "Enabling SSH Access"
sudo systemctl enable sshd.service && sudo systemctl start sshd.service
fi
fi
@ -255,15 +264,15 @@ fi
if [[ $index -eq 20 ]]
then
if [[ $i == *"TRUE"* ]]; then
echo "Rebooting System"
reboot
echo "Rebooting System"
reboot
fi
fi
if [[ $index -eq 21 ]]
then
if [[ $i == *"TRUE"* ]]; then
echo "TEMPLATE"
echo "TEMPLATE"
fi
fi

7
xhost.desktop Normal file
View File

@ -0,0 +1,7 @@
[Desktop Entry]
Exec=xhost +local:
Icon=
Name=xhost
Path=
Terminal=False
Type=Application