#!/bin/bash bash -c 'echo "This Script has to be ran as Sudo"' bash -c "sudo -v" if [ -d "/etc/update-motd.d/old" ];then bash -c "sudo rm /etc/update-motd.d/00-custom" 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' bash -c "sudo chmod +x /etc/update-motd.d/00-custom" else bash -c "sudo apt install inxi -y" bash -c "sudo mkdir /etc/update-motd.d/old" bash -c "sudo mv /etc/update-motd.d/* /etc/update-motd.d/old/" 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' bash -c "sudo chmod +x /etc/update-motd.d/00-custom" fi