added bash script commands
start: starts the service stop: stops the service gracefully
This commit is contained in:
parent
06db65314e
commit
992513fd7c
14
mediawiki.sh
14
mediawiki.sh
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue