headlessvnc : ajout fonction usage

This commit is contained in:
Ahurac 2024-04-06 15:12:23 +02:00
parent 219e75adea
commit 8c82f35f31

View file

@ -3,6 +3,17 @@ perror() {
>&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() {
perror "invalid usage"
>&2 usage