diff --git a/install/generator-cyphernode/generators/app/prompters/000_cyphernode.js b/install/generator-cyphernode/generators/app/prompters/000_cyphernode.js index ce495d8..f0d9265 100644 --- a/install/generator-cyphernode/generators/app/prompters/000_cyphernode.js +++ b/install/generator-cyphernode/generators/app/prompters/000_cyphernode.js @@ -56,7 +56,7 @@ module.exports = { { type: 'confirm', name: 'use_xpub', - default: utils._getDefault( 'want_xpub' )||false, + default: utils._getDefault( 'use_xpub' )||false, message: prefix()+'Use an xpub key to watch or generate adresses?'+utils._getHelp('use_xpub'), }, { @@ -85,4 +85,4 @@ module.exports = { templates: function( props ) { return []; } -}; \ No newline at end of file +}; diff --git a/install/generator-cyphernode/generators/app/templates/installer/start.sh b/install/generator-cyphernode/generators/app/templates/installer/start.sh index 4d09bcd..6021577 100644 --- a/install/generator-cyphernode/generators/app/templates/installer/start.sh +++ b/install/generator-cyphernode/generators/app/templates/installer/start.sh @@ -1,7 +1,17 @@ #!/bin/sh -# run as user <%= username %> -export USER=$(id -u <%= run_as_different_user?username:default_username %>):$(id -g <%= run_as_different_user?username:default_username %>) +<% if (run_as_different_user) { %> +OS=$(uname -s) +if [ "$OS" = "Darwin" ]; then + printf "\r\n\033[0;91m'Run as another user' feature is not supported on OSX. User <%= default_username %> will be used to run Cyphernode.\033[0m\r\n\r\n" + export USER=$(id -u <%= default_username %>):$(id -g <%= default_username %>) +else + export USER=$(id -u <%= username %>):$(id -g <%= username %>) +fi +<% } else { %> +export USER=$(id -u <%= default_username %>):$(id -g <%= default_username %>) +<% } %> + export ARCH=$(uname -m) current_path="$(cd "$(dirname "$0")" >/dev/null && pwd)"