print help contents elaboration

master
czoczo 7 years ago
parent 37b69fff3f
commit 92f1b1c6e1
  1. 8
      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;
}

Loading…
Cancel
Save