Show available scripts in the MOTD

parent 080e5da8
echo "Available scripts:"
ls /usr/local/bin/
ls /usr/local/sbin/ | sed 's/^/sudo /'
......@@ -25,6 +25,7 @@
- showcpu.sh
- showrelease.sh
- uptime.sh
- showscripts.sh
- name: install motd system stats dependencies
apt:
......
......@@ -5,8 +5,9 @@
# Test if the motd is set correctly
diff /etc/motd tests/motd/good_motd.txt && exit || echo "motd not set correctly" && exit 1
# Test if the 3 scripts we use for the motd fail
# Test if the 4 scripts we use for the motd fail
p="/etc/profile.d"
sh $p/showcpu.sh >/dev/null && exit || echo "error in script $p/showcpu.sh" && exit 1
sh $p/showrelease.sh >/dev/null && exit || echo "error in script $p/showrelease.sh" && exit 1
sh $p/uptime.sh >/dev/null && exit || echo "error in script $p/uptime.sh" && exit 1
sh $p/showscripts.sh >/dev/null && exit || echo "error in script $p/showscripts.sh" && exit 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment