This repository was archived by the owner on Mar 5, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +23
-12
lines changed Expand file tree Collapse file tree 3 files changed +23
-12
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1212- A new npm dependency ` dotenv ` has been added. When updating from a previous
1313version it is necessary to install it by executing ` sudo npm install -g dotenv `
1414followed by ` npm link dotenv ` inside the commander directory.
15+ - When using ` bip38 ` the password is no longer exposed in the process monitor.
16+ - Starting the relay/forger/explorer manually is now easier:
17+ Relay:
18+ ` pm2 start --only ark-core-relay `
19+ Forger without bip38 encryption:
20+ ` pm2 start --only ark-core-forger `
21+ Forger with bip38 encryption:
22+ ` pm2 start --only ark-core-forger -- --password ark `
23+ Explorer:
24+ ` pm2 start --only ark-core-explorer `
1525
1626### Removed
1727- Redis
Original file line number Diff line number Diff line change @@ -140,11 +140,8 @@ __forger_configure_bip38 ()
140140
141141__forger_start_with_bip38 ()
142142{
143- local bip38=$( jq -r ' .bip38' " $CORE_CONFIG /delegates.json" )
144-
145143 read -sp " Please enter your bip38 password: " password
146-
147- pm2 start $commander_ecosystem --only ark-core-forger -- --bip38 " $bip38 " --password " $password " >> " $commander_log " 2>&1
144+ pm2 start $commander_ecosystem --only ark-core-forger -- --password " $password " >> " $commander_log " 2>&1
148145}
149146
150147__forger_start_without_bip38 ()
Original file line number Diff line number Diff line change 11require ( 'dotenv' ) . config ( { path : `${ process . env . HOME } /.commander` } )
22
3- const parseArg = ( key ) => {
4- const index = process . argv . indexOf ( key )
3+ const delegates = require ( `${ process . env . CORE_CONFIG } /delegates.json` )
4+
5+ const getPasswordFromArgs = ( ) => {
6+ const index = process . argv . indexOf ( '--password' )
57 if ( index !== - 1 ) {
6- return ` ${ key } ${ process . argv [ index + 1 ] } `
8+ return process . argv [ index + 1 ]
79 }
810
9- return ''
11+ return undefined
1012}
1113
1214module . exports = {
@@ -25,11 +27,13 @@ module.exports = {
2527 args : `forger --data ${ process . env . CORE_DATA }
2628 --config ${ process . env . CORE_CONFIG }
2729 --token ${ process . env . CORE_TOKEN }
28- --network ${ process . env . CORE_NETWORK }
29- ${ parseArg ( '--bip38' ) }
30- ${ parseArg ( '--password' ) } ` ,
30+ --network ${ process . env . CORE_NETWORK } ` ,
3131 max_restarts : 5 ,
32- min_uptime : '5m'
32+ min_uptime : '5m' ,
33+ env : {
34+ ARK_FORGER_BIP38 : delegates . bip38 ,
35+ ARK_FORGER_PASSWORD : getPasswordFromArgs ( )
36+ }
3337 } , {
3438 name : 'ark-explorer' ,
3539 script : `${ process . env . EXPLORER_DIR } /express-server.js` ,
You can’t perform that action at this time.
0 commit comments