check if screen configuration file exists
@@ -246,7 +246,11 @@ def get_cmd(node, env=[], keys=[]):
shell = '-/bin/bash'
if 'SHELL' in os.environ:
shell = '-%s' % os.environ['SHELL']
- return '%s -c %s/screen.cfg -O -L -Logfile %s -s %s -dmS %s' % (SCREEN, SETTINGS_PATH, get_logfile(node=node, for_new_screen=True), shell, create_session_name(node=node))
+ cfg_file = '%s/screen.cfg' % SETTINGS_PATH
+ cfg_opt = ''
+ if os.path.exists(cfg_file):
+ cfg_opt = '-c %s' % cfg_file
+ return '%s %s -O -L -Logfile %s -s %s -dmS %s' % (SCREEN, cfg_opt, get_logfile(node=node, for_new_screen=True), shell, create_session_name(node=node))
def rosclean():
