2
0

fix: update build & setup sh

This commit is contained in:
wfc
2024-12-17 17:38:52 +08:00
parent c185fd3846
commit b7b4a3dfc7
7 changed files with 127 additions and 20 deletions

View File

@@ -20,24 +20,36 @@ Jars=" \
case "$1" in
start)
cd ${DockerDir}
${DockerCompose} up -d
echo $! > ${PIDFile}
if [ -z "$2" ]; then
${DockerCompose} up -d
echo $! > ${PIDFile}
else
${DockerCompose} up -d $2
fi
;;
stop)
cd ${DockerDir}
${DockerCompose} down
if [ -f ${PIDFile} ]; then
rm ${PIDFile}
if [ -z "$2" ]; then
${DockerCompose} stop
if [ -f ${PIDFile} ]; then
rm ${PIDFile}
fi
else
${DockerCompose} stop $2
fi
;;
restart)
$0 stop
$0 stop $2
sleep 1
$0 start
$0 start $2
;;
status)
cd ${DockerDir}
${DockerCompose} ps
if [ -z "$2" ]; then
${DockerCompose} ps
else
${DockerCompose} ps $2
fi
;;
version)
cd ${WFCBinDir}