config tool now uses user which it runs under as default user for cyphernode, when run_as_user is not selected

This commit is contained in:
jash
2018-11-01 19:02:53 +01:00
committed by kexkey
parent 1da3984e97
commit 91f8dc2346
3 changed files with 3 additions and 1 deletions

1
dist/setup.sh vendored
View File

@@ -181,6 +181,7 @@ configure() {
# configure features of cyphernode
docker run -v $current_path:/data \
-e DEFAULT_USER=$USER \
--log-driver=none$pw_env \
--rm$interactive cyphernodeconf:latest $(id -u):$(id -g) yo --no-insight cyphernode$gen_options $recreate
}

View File

@@ -327,6 +327,7 @@ module.exports = class extends Generator {
lightning_nodename: '',
lightning_nodecolor: ''
}, this.props );
this.props.default_username = process.env.DEFAULT_USER || '';
}
_isChecked( name, value ) {

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# run as user <%= username %>
export USER=$(id -u <%= run_as_different_user?username:'' %>):$(id -g <%= run_as_different_user?username:'' %>)
export USER=$(id -u <%= run_as_different_user?username:default_username %>):$(id -g <%= run_as_different_user?username:default_username %>)
export ARCH=$(uname -m)
<% if (docker_mode == 'swarm') { %>