File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ WITNET_FOLDER=" /.witnet"
4+ CONFIG_FILE_FROM_CMD=$( echo " $@ " | sed -E ' s/(.*-c\s*)?(.*\.toml)?.*/\2/' )
5+ CONFIG_FILE=${CONFIG_FILE_FROM_CMD:- $WITNET_FOLDER / config/ witnet.toml}
6+ COMMAND=$( echo " $@ " | sed -E ' s/(.*-c\s*)?(.*\.toml)?//' )
7+
38ERROR_BANNER="
49
510 ██████╗██████╗ █████╗ ███████╗██╗ ██╗██╗
@@ -52,6 +57,6 @@ while true; do
5257
5358 # Run the node itself, using configuration from the default directory and passing down any arguments that may be
5459 # appended when running "docker run"
55- RUST_LOG=witnet=$LOG_LEVEL /tmp/witnet-raw -c /.witnet/config/witnet.toml " $@ " || echo " $ERROR_BANNER "
60+ RUST_LOG=witnet=$LOG_LEVEL /tmp/witnet-raw -c " $CONFIG_FILE " " $COMMAND " || echo " $ERROR_BANNER "
5661 sleep 30
5762done
You can’t perform that action at this time.
0 commit comments