Add 'make undeploy' target to kill all running nodes

Problem: previously, in order to completely shut down a running
localnet, users had to attach to their 'localnet' screen and kill (^C)
each process, then quit and kill the entire screen session.

Solution: this change introduces an 'undeploy' target that automates
sending the ^C to each screen window followed by sending screen's 'kill'
command to any remaining windows, thus killing the entire 'localnet'
screen session.

The result is that users may now run the following two commands in
succession any number of times to bring their localnet up and down (to
'deploy' and 'undeploy' their localnet).

    # bring up localnet
    $ make deploy

    # use localnet to test, develop, etc...

    # bring down localnet
    $ make undeploy
This commit is contained in:
Chris Beams 2019-12-03 11:56:04 +01:00
parent 234c228df8
commit ed40afb151
No known key found for this signature in database
GPG Key ID: 3D214F8F5BC5ED73

View File

@ -168,6 +168,14 @@ deploy: setup
# generate a block to ensure Bisq nodes get dao-synced
make block
# Undeploy a running localnet by killing all Bitcoin and Bisq
# node processes, then killing the localnet screen session altogether
undeploy:
# kill all Bitcoind and Bisq nodes running in screen windows
screen -S localnet -X at "#" stuff "^C"
# quit all screen windows which results in killing the session
screen -S localnet -X at "#" kill
bitcoind: .localnet
bitcoind \
-regtest \