Start device servers with custom scripts
Currently, to start a device server using Starter we need an executable script which name matches the device server name.
I wonder if we could add to Starter a functionality to start device servers with custom scripts.
In our case in Sardana we created one global script with subcommands to group all the Sardana applications/tools e.g.:
sardana spocksardana configsardana macroexecutor- etc.
And we also plan to unify there all our servers e.g.
-
sardana server- this should startSardanaserver -
sardana server --pool- this should startPoolserver -
sardana server --macroserver- this should startMacroServerserver
This is not problematic to start device servers witch such scripts from the terminal. But I think it is not compatible with Starter.
One idea on how to implement it that comes to my mind is to add a new property on the Starter device which would accept a interleaved list of strings with device server name(s) and a custom script(s). So in our case:
Sardana
sardana server
Pool
sardana server --pool
MacroServer
sardana server --macroserver
And in case one would like to start a device server and it is not possible to find an executable following the device server name it would look in the mapping created based on this property value to find the custom script and try to execute it.
See related question: https://www.tango-controls.org/community/forum/c/development/python/python-and-astor