Browse Source
Merge pull request #113 from Samourai-Wallet/imp_mydojo_ronin
check if dojo is running (start and stop commands)
umbrel
kenshin samourai
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
14 additions and
1 deletions
-
docker/my-dojo/dojo.sh
|
|
@ -50,11 +50,24 @@ docker_up() { |
|
|
|
|
|
|
|
# Start |
|
|
|
start() { |
|
|
|
docker_up --remove-orphans |
|
|
|
# Check if dojo is running (check the db container) |
|
|
|
isRunning=$(docker inspect --format="{{.State.Running}}" db 2> /dev/null) |
|
|
|
|
|
|
|
if [ $? -eq 1 ] || [ "$isRunning" == "false" ]; then |
|
|
|
docker_up --remove-orphans |
|
|
|
else |
|
|
|
echo "Dojo is already running." |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|
# Stop |
|
|
|
stop() { |
|
|
|
# Check if dojo is running (check the db container) |
|
|
|
isRunning=$(docker inspect --format="{{.State.Running}}" db 2> /dev/null) |
|
|
|
if [ $? -eq 1 ] || [ "$isRunning" == "false" ]; then |
|
|
|
echo "Dojo is already stopped." |
|
|
|
exit |
|
|
|
fi |
|
|
|
# Shutdown the bitcoin daemon |
|
|
|
if [ "$BITCOIND_INSTALL" == "on" ]; then |
|
|
|
# Renewal of bitcoind onion address |
|
|
|