Ajout : fonction restart dans mcserv

This commit is contained in:
Hippolyte Chauvin 2023-07-10 15:30:53 +02:00
parent 94bf38be75
commit 7a28b4fd3b

View file

@ -23,7 +23,7 @@ public_usage() {
name="$(basename "$0")"
cat << EOF
${name}: utilisation
${name} start|status|stop|watch NOM_SERVEUR
${name} start|status|stop|watch|restart NOM_SERVEUR
${name} list|active|usage
EOF
}
@ -77,10 +77,17 @@ public_list() {
ls --color=auto
}
public_restart() {
set -e
stop "$@"
start "$@"
set +e
}
verb="$1"
shift
case "$verb" in
start|status|stop|watch|active|list|usage)
start|status|stop|watch|active|list|usage|restart)
"public_${verb}" "$@"
;;
"")