1
0
Fork 0
forked from ahurac/dotfiles

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