Update update-public-setupfiles.sh

Updates Updates file
This commit is contained in:
WickedYoda committed 2024-05-09 15:43:11 -05:00
1 parent cb04d34837
commit 87ed969bbc
1 file changed
+10 -9
+10 -9
View File
@@ -3,24 +3,25 @@
cd /home/traver cd /home/traver
# Check distro and download updated public-setupfiles # Check distro and download updated public-setupfiles
if [ -x "$(command -v lsb_release)" ]; then if [ -x "$(command -v os-release)" ]; then
distro=$(lsb_release -si) $ID=$(os-release -si)
else else
distro=$(cat /etc/os-release | grep -oP '(?<=^ID=).+' | tr -d '"') $ID=$(cat /etc/os-release | grep -oP '(?<=^ID=).+' | tr -d '"')
fi fi
if [ "$distro" = "Ubuntu" ]; then if [ "$ID" = "Ubuntu" ]; then
# Pull file A # Pull file A
wget https://raw.githubusercontent.com/wickedyoda/public-setupfiles/main/server_config/ubuntu/ubuntu-setup.sh wget https://raw.githubusercontent.com/wickedyoda/public-setupfiles/main/server_config/ubuntu/ubuntu-setup.sh && chmod +x ./ubuntu-setup.sh
elif [ "$distro" = "Debian" ]; then elif [ "$ID" = "Debian" ]; then
# Pull file B # Pull file B
wget https://raw.githubusercontent.com/wickedyoda/public-setupfiles/main/server_config/debian/debian-setup.sh wget https://raw.githubusercontent.com/wickedyoda/public-setupfiles/main/server_config/debian/debian-setup.sh && chmod +x ./debian-setup.sh
elif [ "$ID" = "raspbian" ]; then
# Pull file B
wget https://raw.githubusercontent.com/wickedyoda/public-setupfiles/main/server_config/debian/debian-setup.sh && chmod +x ./debian-setup.sh
fi fi
# make updated files executable # make updated files executable
cd /home/traver cd /home/traver
chmod +x ./ubuntu-setup.sh
chmod +x ./debian-setup.sh
# Check if /home/traver/public-setupfiles exists # Check if /home/traver/public-setupfiles exists
if [ -d "/home/traver/public-setupfiles" ]; then if [ -d "/home/traver/public-setupfiles" ]; then