2022-06-10 20:26:28 +00:00
|
|
|
#!/bin/bash
|
2022-06-26 19:49:12 +00:00
|
|
|
bash -c 'echo "This Script has to be ran as Sudo"'
|
|
|
|
|
bash -c "sudo -v"
|
2022-06-11 08:43:23 +00:00
|
|
|
if [ -d "/etc/update-motd.d/old" ];then
|
2022-06-11 09:13:11 +00:00
|
|
|
bash -c "sudo rm /etc/update-motd.d/00-custom"
|
2022-06-11 08:43:23 +00:00
|
|
|
bash -c 'sudo wget https://git.ncltech.co.uk/api/v1/repos/Phil/update-motd.d/raw/00-custom -O /etc/update-motd.d/00-custom'
|
2022-06-11 08:45:35 +00:00
|
|
|
bash -c "sudo chmod +x /etc/update-motd.d/00-custom"
|
2022-06-11 08:43:23 +00:00
|
|
|
else
|
2022-06-11 08:22:32 +00:00
|
|
|
bash -c "sudo apt install inxi -y"
|
2022-06-10 20:28:50 +00:00
|
|
|
bash -c "sudo mkdir /etc/update-motd.d/old"
|
|
|
|
|
bash -c "sudo mv /etc/update-motd.d/* /etc/update-motd.d/old/"
|
2022-06-11 08:43:23 +00:00
|
|
|
bash -c 'sudo wget https://git.ncltech.co.uk/api/v1/repos/Phil/update-motd.d/raw/00-custom -O /etc/update-motd.d/00-custom'
|
2022-06-10 20:28:50 +00:00
|
|
|
bash -c "sudo chmod +x /etc/update-motd.d/00-custom"
|
2022-06-11 08:43:23 +00:00
|
|
|
fi
|