deployments: Allow users to print whole logs or just follow them

Users can call the script with "-f" or "--follow" in order to follow the
latest lines (like with system tool "tail -f"), of not provide this
argument to obtain the whole contents of the logs.
pull/734/head
Juan Navarro 2022-06-06 14:54:43 +02:00
parent 5d61cb1afa
commit 4e54cd2472
4 changed files with 20 additions and 6 deletions

View File

@ -245,8 +245,8 @@ case $1 in
;; ;;
logs) logs)
case $2 in case "${2-}" in
"-f") --follow|-f)
docker-compose logs -f --tail 10 openvidu-server docker-compose logs -f --tail 10 openvidu-server
;; ;;
*) *)

View File

@ -254,8 +254,15 @@ case $1 in
;; ;;
logs) logs)
case "${2-}" in
--follow|-f)
docker-compose logs -f --tail 10 openvidu-server docker-compose logs -f --tail 10 openvidu-server
;; ;;
*)
docker-compose logs openvidu-server
;;
esac
;;
upgrade) upgrade)
if [ -z "$2" ]; then if [ -z "$2" ]; then

View File

@ -259,8 +259,8 @@ case $1 in
;; ;;
logs) logs)
case $2 in case "${2-}" in
"-f") --follow|-f)
docker-compose logs -f --tail 10 media-node-controller docker-compose logs -f --tail 10 media-node-controller
;; ;;
*) *)

View File

@ -274,8 +274,15 @@ case $1 in
;; ;;
logs) logs)
case "${2-}" in
--follow|-f)
docker-compose logs -f --tail 10 openvidu-server docker-compose logs -f --tail 10 openvidu-server
;; ;;
*)
docker-compose logs openvidu-server
;;
esac
;;
upgrade) upgrade)
if [ -z "$2" ]; then if [ -z "$2" ]; then