Ajout : fonction restart dans mcserv
This commit is contained in:
parent
94bf38be75
commit
7a28b4fd3b
1 changed files with 9 additions and 2 deletions
11
bin/mcserv
11
bin/mcserv
|
@ -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}" "$@"
|
||||||
;;
|
;;
|
||||||
"")
|
"")
|
||||||
|
|
Loading…
Reference in a new issue