diff --git a/infrastructure/control/osimctrl/README.md b/infrastructure/control/osimctrl/README.md index ef4ca95..a9770cf 100644 --- a/infrastructure/control/osimctrl/README.md +++ b/infrastructure/control/osimctrl/README.md @@ -49,11 +49,12 @@ status - get the current status of the component. There are also a few optional switches --n, --noattach +-a, --attach -Do not automatically attach to the screen component once it has started. +Only valid for start and restart commands. If set then osimctrl automatically +attaches you to the screen of the [re]started component. --a, --autorestart +-r, --autorestart If a component fails, then automatically restart it. If you use this option then you can only stop the component with the stop command instead of manually diff --git a/infrastructure/control/osimctrl/src/osimctrl/osimctrl.py b/infrastructure/control/osimctrl/src/osimctrl/osimctrl.py index 7f6bc77..47595be 100644 --- a/infrastructure/control/osimctrl/src/osimctrl/osimctrl.py +++ b/infrastructure/control/osimctrl/src/osimctrl/osimctrl.py @@ -132,7 +132,7 @@ class OSimCtrl: print >> sys.stderr, "ERROR: %s did not start." % self._componentName return False - if not opts.noattach: + if opts.attach: execCmd("%s -x %s" % (self._screenPath, self._screenName)) return True @@ -213,15 +213,15 @@ def main(binaryPath, screenPath, switches, monoPath, componentName, screenName): help = "\n".join(["%s - %s" % (k, v['help']) for k, v in commands.iteritems()])) parser.add_argument( - '-a', + '-r', '--autorestart', help = "Automatically restart component if it crashes. With this option, it can only be stopped via the stop command, not by manually attaching to the screen and shutting down the component.", action = "store_true") parser.add_argument( - '-n', - '--noattach', - help = "Start and restart commmands will not attach to the started screen instance.", + '-a', + '--attach', + help = "Start and restart commmands will also attach to the started screen instance.", action = "store_true") opts = parser.parse_args()