forked from extern/easydiffusion
25 lines
360 B
Plaintext
25 lines
360 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
CMD="$1"
|
||
|
if [ -z "$1" ]; then
|
||
|
CMD="start"
|
||
|
fi
|
||
|
|
||
|
start_server() {
|
||
|
docker-compose up &
|
||
|
}
|
||
|
|
||
|
stop_server() {
|
||
|
docker-compose down
|
||
|
}
|
||
|
|
||
|
if [ "$CMD" == "start" ]; then
|
||
|
start_server
|
||
|
elif [ "$CMD" == "stop" ]; then
|
||
|
stop_server
|
||
|
elif [ "$CMD" == "restart" ]; then
|
||
|
stop_server
|
||
|
start_server
|
||
|
else
|
||
|
echo "Unknown option: $1 (Expected start or stop)"
|
||
|
fi
|