forked from ahurac/dotfiles
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")"
|
||||
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}" "$@"
|
||||
;;
|
||||
"")
|
||||
|
|
Loading…
Reference in a new issue