Added "./launcher logs" command.

This commit is contained in:
Shuai Lin 2016-11-25 15:28:20 +08:00
parent 6e84e376a6
commit b09cc739b3

View file

@ -185,28 +185,27 @@ start() {
) )
} }
stop() { ensure_container_running() {
set_existing_container set_existing_container
if [[ $existing != "" ]]; then if [[ $existing == "" ]]; then
(
set -x
docker stop -t 10 seafile
)
else
err_and_quit "seafile was not started !" err_and_quit "seafile was not started !"
fi fi
} }
stop() {
ensure_container_running
(
set -x
docker stop -t 10 seafile
)
}
enter() { enter() {
set_existing_container ensure_container_running
if [[ $existing != "" ]]; then
( (
set -x set -x
docker exec -it seafile /bin/bash docker exec -it seafile /bin/bash
) )
else
err_and_quit "seafile was not started !"
fi
} }
restart() { restart() {
@ -227,7 +226,11 @@ check_prereqs() {
} }
logs() { logs() {
err_and_quit "Not implemented yet" ensure_container_running
(
set -x
docker logs --tail=20 -f seafile
)
} }
destroy() { destroy() {