Remove created lockfile
This commit is contained in:
parent
634d8e25ee
commit
b6558a2ef3
|
@ -368,33 +368,21 @@ deploy() {
|
||||||
}
|
}
|
||||||
|
|
||||||
ENABLED_LOCKFILE="${HOME}/${TESTNET}.is_enabled"
|
ENABLED_LOCKFILE="${HOME}/${TESTNET}.is_enabled"
|
||||||
CREATED_LOCKFILE="${HOME}/${TESTNET}.is_created"
|
|
||||||
|
|
||||||
create-and-start() {
|
create-and-start() {
|
||||||
rm -f "${CREATED_LOCKFILE}"
|
|
||||||
deploy create start
|
deploy create start
|
||||||
touch "${CREATED_LOCKFILE}"
|
|
||||||
}
|
}
|
||||||
create() {
|
create() {
|
||||||
rm -f "${CREATED_LOCKFILE}"
|
|
||||||
deploy create
|
deploy create
|
||||||
touch "${CREATED_LOCKFILE}"
|
|
||||||
}
|
}
|
||||||
start() {
|
start() {
|
||||||
if [[ -f ${CREATED_LOCKFILE} ]]; then
|
deploy "" start
|
||||||
deploy "" start
|
|
||||||
else
|
|
||||||
echo "Unable to start ${TESTNET}. Are the nodes created?
|
|
||||||
Re-run ci/testnet-manager.sh with \$TESTNET_OP=create or \$TESTNET_OP=create-and-start"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
stop() {
|
stop() {
|
||||||
deploy "" ""
|
deploy "" ""
|
||||||
}
|
}
|
||||||
delete() {
|
delete() {
|
||||||
deploy "" "" "" delete
|
deploy "" "" "" delete
|
||||||
rm -f "${CREATED_LOCKFILE}"
|
|
||||||
}
|
}
|
||||||
enable_testnet() {
|
enable_testnet() {
|
||||||
touch "${ENABLED_LOCKFILE}"
|
touch "${ENABLED_LOCKFILE}"
|
||||||
|
@ -406,7 +394,7 @@ disable_testnet() {
|
||||||
}
|
}
|
||||||
is_testnet_enabled() {
|
is_testnet_enabled() {
|
||||||
if [[ ! -f ${ENABLED_LOCKFILE} ]]; then
|
if [[ ! -f ${ENABLED_LOCKFILE} ]]; then
|
||||||
echo "--- ${TESTNET} is currently disabled. Enable ${TESTNET} by running ci/testnet-manager.sh with \$TESTNET_OP=enable, then re-run with current settings."
|
echo "+++ ${TESTNET} is currently disabled. Enable ${TESTNET} by running ci/testnet-manager.sh with \$TESTNET_OP=enable, then re-run with current settings."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue