File tree 6 files changed +18
-7
lines changed
6 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ sudo docker run --rm --network=host -d olton/mina_monitor_server:latest -journal
9
9
### Set Mina Monitor Server parameters
10
10
Begin from 1.1.5, you can redefine config parameters with command line arguments:
11
11
``` shell
12
- node server/index -publicKey B62q... -price:currency usd -alertToDiscord [ " FAIL" ]
12
+ node server/index -publicKey B62q... -price:currency usd -alertToDiscord FAIL,EXEC,STATUS
13
13
```
14
14
This command overwrite three config parameters:
15
15
``` json
@@ -18,7 +18,7 @@ This command overwrite three config parameters:
18
18
"price" : {
19
19
"currency" : " usd"
20
20
},
21
- "alertToDiscord" : [" FAIL" ]
21
+ "alertToDiscord" : [" FAIL" , " EXEC " , " STATUS " ]
22
22
}
23
23
```
24
24
Original file line number Diff line number Diff line change 1
-
2
1
The MIT License (MIT)
3
2
4
3
Copyright (c) 2021 Serhii Pimenov.
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ const updateConfigFromArguments = (c) => {
28
28
v = Number ( v )
29
29
} else if ( [ 'true' , 'false' ] . includes ( v . toLowerCase ( ) ) ) {
30
30
v = v . toLowerCase ( ) === 'true'
31
- } else if ( v . includes ( "[" ) ) {
31
+ } else if ( v . includes ( "[" ) || v . includes ( "," ) ) {
32
32
v = v . replace ( / [ \[ \] " ' ` ] / gi, "" ) . split ( "," )
33
33
}
34
34
Original file line number Diff line number Diff line change @@ -19,15 +19,20 @@ const {processJournal} = require("./modules/journal")
19
19
const { updateConfigFromArguments} = require ( "./helpers/arguments" ) ;
20
20
21
21
// const __dirname = dirname(fileURLToPath(import.meta.url))
22
+ const configPathLinux = "/etc/minamon/config.json"
22
23
const configPath = path . resolve ( __dirname , 'config.json' )
23
24
24
25
if ( ! fs . existsSync ( configPath ) ) {
25
26
throw new Error ( "Config file not exist!" )
26
27
}
27
28
28
- const config = updateConfigFromArguments ( JSON . parse ( fs . readFileSync ( configPath , 'utf-8' ) ) )
29
+ const readConfig = ( path ) => updateConfigFromArguments ( JSON . parse ( fs . readFileSync ( path , 'utf-8' ) ) )
30
+
31
+ const config = readConfig ( process . platform === 'linux' && fs . existsSync ( configPathLinux ) ? configPathLinux : configPath )
29
32
const [ SERVER_HOST , SERVER_PORT ] = config . host . split ( ":" )
30
33
34
+ console . log ( config )
35
+
31
36
/* Create log dir */
32
37
const logDir = path . resolve ( __dirname , "logs" )
33
38
if ( ! fs . existsSync ( logDir ) ) fs . mkdirSync ( logDir )
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ StartLimitBurst=3
8
8
Type =simple
9
9
Restart =always
10
10
RestartSec =15
11
- ExecStart =/usr/bin/node /home/user-name/mina-monitor /index
12
- ExecStop =/usr/bin/pkill -9 -f "node mina-monitor /index"
11
+ ExecStart =/usr/bin/node /home/user/minamon /index
12
+ ExecStop =/usr/bin/pkill -9 -f "node minamon /index"
13
13
14
14
[Install]
15
15
WantedBy =multi-user.target
Original file line number Diff line number Diff line change @@ -73,6 +73,13 @@ query ($publicKey: String!) {
73
73
stateHash
74
74
unknown
75
75
}
76
+ timing {
77
+ vesting_period
78
+ vesting_increment
79
+ initial_mininum_balance
80
+ cliff_time
81
+ cliff_amount
82
+ }
76
83
}
77
84
}
78
85
` ;
You can’t perform that action at this time.
0 commit comments