added bash script commands

start: starts the service
stop: stops the service gracefully
This commit is contained in:
Bryan Joshua Pedini 2020-01-29 11:39:18 +01:00
parent 06db65314e
commit 992513fd7c
1 changed files with 13 additions and 1 deletions

View File

@ -10,13 +10,17 @@ cat << "EOF"
EOF
function show_help () {
echo "Usage: $0 [help] [install] [full-upgrade]"
echo "Usage: $0 [help] [install] [start] [stop] [full-upgrade]"
cat << "EOF"
Parameters:
help: Displays this help message and exits.
install: Installs the necessary files, starts the service and exits.
start: Starts the servers, brings the service online and exits.
stop: Brings the service offline, stops the servers gracefully and exits.
full-upgrade: Deletes the servers and their images, maintaining the data, recreates everything from scratch and exits.
EOF
@ -32,6 +36,14 @@ for par in "$@"; do
docker-compose up -d
exit 0
;;
"start")
docker-compose up -d
exit 0
;;
"stop")
docker-compose down
exit 0
;;
"full-upgrade")
docker-compose down
docker network rm mediawiki