Compare commits

..

No commits in common. "7c0ebf50b5780fe8facddb1341c6b5610c5d3ddc" and "219e75adea8058ec4aec6bae3778a40d0da819f5" have entirely different histories.

View file

@ -3,17 +3,6 @@ perror() {
>&2 printf '\033[1;31mERROR:\033[0m \033[1m%s\033[0m\n' "$*" >&2 printf '\033[1;31mERROR:\033[0m \033[1m%s\033[0m\n' "$*"
} }
usage() {
name=$(basename "$0")
cat << EOF
${name}: usage
${name} [status] - show if the server is running
${name} start|stop|restart - control the server
${name} help|usage - show help
EOF
}
error_usage() { error_usage() {
perror "invalid usage" perror "invalid usage"
>&2 usage >&2 usage
@ -57,14 +46,13 @@ status() {
} }
case "$1" in case "$1" in
""|stat*) status ;; ""|status) status ;;
star*) start ;; start) start ;;
sto*) stop ;; stop) stop ;;
r*) restart)
stop stop
start start
;; ;;
h*|u*) usage ;;
*) *)
error_usage error_usage
;; ;;