Updated script to check for install and Updated README.md

This commit is contained in:
Phil 2022-06-11 09:43:23 +01:00
parent 4a18b13772
commit 895806d5b1
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,8 @@
# update-motd.d
Custom update-motd.d Messages
## Custom update-motd.d Messages
Install / Update Script one liner
```
curl https://ubuntu-motd.nclte.ch | sudo bash
```

View File

@ -1,6 +1,11 @@
#!/bin/bash
if [ -d "/etc/update-motd.d/old" ];then
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'
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 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