we have several program running in a remote server, and this is how we run the program on the remote server
program-run --config-file simnow-xx or
program-run --config-file prod-xx
$ src/[login to view URL] send-signal
this will query the remote instance and return the following info:
a: SIGUSR1 reload config
b: SIGUSR2 gracefully stop
c: XXXX hedge position
d: XXXX clear position
e: etc, etc
Choose an instane and signal pair (e.g., "1 b"):
Then if user enters 1 b (and hit ENTER), it continues to print:
"Will send SIGUSR1 (reload config) to "simnow-a1". Confirm [y/N]?""
Then if user enters y, it does this operation (for example reload config, it will call the [login to view URL] in remote server). If user enters anything else, it goes back to the initial state (printing the instances and signals)
in the script, we can define the Available signals.