From 92f1b1c6e14dcb09e63cc46b2882187983358a36 Mon Sep 17 00:00:00 2001 From: czoczo Date: Wed, 19 Dec 2018 00:28:47 +0100 Subject: [PATCH] print help contents elaboration --- bmotd.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bmotd.sh b/bmotd.sh index 1840237..b13f641 100755 --- a/bmotd.sh +++ b/bmotd.sh @@ -19,7 +19,7 @@ main () { # check if root if ! isRoot; then - echo 'Script needs root privileges to alter motd. Re-run with sudo.' + echo 'Script needs root privileges to run. Re-run with sudo.' exit 1 fi @@ -110,7 +110,11 @@ update() { } function printHelp { - printf "./$0 test | update | disable | enable" + echo -e "Use: $0 [ test | update | enable | disable ]\n" + printf " %-6s %s\n" "test" "- Print generated motd to standard output. Use for preview." + printf " %-6s %s\n" "update" "- Update /etc/motd file" + printf " %-6s %s\n" "enable" "- Places $0 in /etc and adds cron entry for script to run every minute" + printf " %-6s %s\n\n" "disable" "- Removes cron entry and disables refreshes of /etc/motd" exit 0; }