mirror of
https://github.com/aljazceru/cyphernode.git
synced 2026-02-04 12:04:27 +01:00
exitStatus.sh lets the setup bash script know if the docker process exited cleanly
This commit is contained in:
8
dist/setup.sh
vendored
8
dist/setup.sh
vendored
@@ -167,6 +167,14 @@ configure() {
|
||||
-e DEFAULT_USER=$USER \
|
||||
--log-driver=none$pw_env \
|
||||
--rm$interactive cyphernodeconf:latest $(id -u):$(id -g) yo --no-insight cyphernode$gen_options $recreate
|
||||
if [[ -f exitStatus.sh ]]; then
|
||||
. ./exitStatus.sh
|
||||
rm ./exitStatus.sh
|
||||
fi
|
||||
|
||||
if [[ ! $EXIT_STATUS == 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
copy_file() {
|
||||
|
||||
@@ -104,6 +104,10 @@ module.exports = class extends Generator {
|
||||
|
||||
this.featureChoices = featureChoices;
|
||||
|
||||
if( fs.existsSync(path.join('/data', 'exitStatus.sh')) ) {
|
||||
fs.unlinkSync(path.join('/data', 'exitStatus.sh'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async _initConfig() {
|
||||
@@ -311,6 +315,9 @@ module.exports = class extends Generator {
|
||||
}
|
||||
}
|
||||
|
||||
fs.writeFileSync(path.join('/data', 'exitStatus.sh'), 'EXIT_STATUS=0');
|
||||
|
||||
|
||||
}
|
||||
|
||||
install() {
|
||||
|
||||
Reference in New Issue
Block a user