fix: explicitly ignore SIGINT signal
parent
15ce6246fe
commit
c47158ee88
|
@ -21,7 +21,7 @@ editWithRestart() {
|
||||||
nano "${full_path_file_to_edit}"
|
nano "${full_path_file_to_edit}"
|
||||||
stdout "The server will now be restarted and you will be attached to the logs."
|
stdout "The server will now be restarted and you will be attached to the logs."
|
||||||
stdout "Use ctrl-c to detach from the logs (the service will continue to run in background)"
|
stdout "Use ctrl-c to detach from the logs (the service will continue to run in background)"
|
||||||
(cd "${VRISING_COMPOSE_HOME}" && bash -c "docker-compose restart && docker-compose logs -f")
|
(cd "${VRISING_COMPOSE_HOME}" && docker-compose restart && docker-compose logs -f)
|
||||||
}
|
}
|
||||||
|
|
||||||
USERNAME="${1}"
|
USERNAME="${1}"
|
||||||
|
@ -37,7 +37,8 @@ LOGS_FOLDER="${HOME}/logs"
|
||||||
mkdir -p "${LOGS_FOLDER}" || (stderr "Unable to create logs folder, exiting" && exit 1)
|
mkdir -p "${LOGS_FOLDER}" || (stderr "Unable to create logs folder, exiting" && exit 1)
|
||||||
|
|
||||||
stdout "Welcome ${USERNAME}, please remember that your current activity in the server is logged!"
|
stdout "Welcome ${USERNAME}, please remember that your current activity in the server is logged!"
|
||||||
stdout "Exit and logout at any moment by pressing ctrl-c"
|
|
||||||
|
trap "" INT
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
|
@ -66,15 +67,15 @@ Select one of the following actions:
|
||||||
;;
|
;;
|
||||||
3)
|
3)
|
||||||
stdout "Use ctrl-c to detach from the logs at any time"
|
stdout "Use ctrl-c to detach from the logs at any time"
|
||||||
(cd "${VRISING_COMPOSE_HOME}" && bash -c "docker-compose logs -f")
|
(cd "${VRISING_COMPOSE_HOME}" && docker-compose logs -f)
|
||||||
;;
|
;;
|
||||||
4)
|
4)
|
||||||
stdout "Use ctrl-c to detach from the logs at any time"
|
stdout "Use ctrl-c to detach from the logs at any time"
|
||||||
(cd "${VRISING_COMPOSE_HOME}" && bash -c "docker-compose restart && docker-compose logs -f")
|
(cd "${VRISING_COMPOSE_HOME}" && docker-compose restart && docker-compose logs -f)
|
||||||
;;
|
;;
|
||||||
5)
|
5)
|
||||||
stdout "Use ctrl-c to detach from the logs at any time"
|
stdout "Use ctrl-c to detach from the logs at any time"
|
||||||
(cd "${VRISING_COMPOSE_HOME}" && bash -c "docker-compose down -v && sleep 1 && docker-compose up -d && docker-compose logs -f")
|
(cd "${VRISING_COMPOSE_HOME}" && docker-compose down -v && sleep 1 && docker-compose up -d && docker-compose logs -f)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
stderr "The provided input is not valid. Please chose from the listed actions"
|
stderr "The provided input is not valid. Please chose from the listed actions"
|
||||||
|
|
Loading…
Reference in New Issue