feat: add V Rising server #22

Closed
polpetta wants to merge 11 commits from vrising into master
Showing only changes of commit c47158ee88 - Show all commits

View File

@ -21,7 +21,7 @@ editWithRestart() {
nano "${full_path_file_to_edit}"
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)"
(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}"
@ -37,7 +37,8 @@ LOGS_FOLDER="${HOME}/logs"
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 "Exit and logout at any moment by pressing ctrl-c"
trap "" INT
while true
do
@ -66,15 +67,15 @@ Select one of the following actions:
;;
3)
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)
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)
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"