From 895806d5b1a33c6c8c3b46e26b2cd1900d0b55ff Mon Sep 17 00:00:00 2001 From: Phil Date: Sat, 11 Jun 2022 09:43:23 +0100 Subject: [PATCH] Updated script to check for install and Updated README.md --- README.md | 7 ++++++- setup.sh | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7b4eb05..506eeab 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ # update-motd.d -Custom update-motd.d Messages \ No newline at end of file +## Custom update-motd.d Messages + +Install / Update Script one liner +``` +curl https://ubuntu-motd.nclte.ch | sudo bash +``` diff --git a/setup.sh b/setup.sh index a5b3d2d..3e52277 100755 --- a/setup.sh +++ b/setup.sh @@ -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