Added invocation

This commit is contained in:
Leopere 2018-10-08 18:37:34 -04:00
parent 83b7e6b248
commit 67d3e00261

View file

@ -1,6 +1,9 @@
#!/bin/bash #!/bin/bash
#!/bin/sh #!/bin/sh
## Launch service will tell prism-bin what mode to run in.
LAUNCHMODE="${MODE:-$1}"
## This variable will be what can override default launch args. I may modify this as I learn more about prism-bin ## This variable will be what can override default launch args. I may modify this as I learn more about prism-bin
LAUNCHARGS="${CUSTOM_ARGS:-$2}" LAUNCHARGS="${CUSTOM_ARGS:-$2}"
@ -73,18 +76,21 @@ function config_modify() {
} }
config_modify config_modify
case $1 in ## Actual launch invoked here
case $MODE in
cluster ) cluster )
prism-bin cluster ${LAUNCHARGS:-default_args} prism-bin cluster ${LAUNCHARGS:-'-v --conf /data/config.tmpl'}
;; ;;
dht ) dht )
prism-bin dht ${LAUNCHARGS:-default_args} ## Env vars NODEID DHTPORT
## Figure out what port we want to run --rpcPort on by default
## Figure out if we need seed strings and set default(s)
prism-bin dht ${LAUNCHARGS:-'-v --conf /data/config.tmpl --nodeID $NODEID --port "${DHTPORT:-4567}"'}
;; ;;
peer ) peer )
prism-bin peer ${LAUNCHARGS:-default_args} prism-bin peer ${LAUNCHARGS:-'-v --conf /data/config.tmpl'}
;; ;;
reflector ) reflector )
prism-bin reflector ${LAUNCHARGS:-default_args} prism-bin reflector ${LAUNCHARGS:-'-v --conf /data/config.tmpl'}
;; ;;
esac esac
prism-bin