liftoff/GateOne — pull request #372 by toni-moreno (2013-12-06 08:25:10+00:00)
Title: added shell_command_is_shell option into terminal config , saving one sh...

Hi Daniel.

I Would like to contribute to your great project.

As you know we are working with gateone in embedded mode in the ITSAT project and we need to exec a external command ( in our case a php console script /usr/bin/php5 -f )

if we put this config

"commands": {

"ITSAT-SHELL": {
"command": " /usr/bin/php5 -f /opt/itsat/usr/bin/rcpsh",
"description": "Connect to hosts via ITSAT SHELL."
}
},

On each opened terminal we had this process tree

gateone,2175 /usr/local/bin/gateone --settings_dir=/opt/itsat/etc/gateone
+-sh,3465 -c /usr/bin/php5 -f /opt/itsat/usr/bin/rcpsh; sleep .1
+-/usr/bin/php5 -f /opt/itsat/usr/bin/rcpsh ,3466

Now I can Configure GateOne Terminal

"commands": {
"ITSAT-SHELL": {
"command": "/opt/itsat/usr/bin/rcpsh",
"description": "Connect to hosts via ITSAT SHELL."
}
},
"shell_command": "/usr/bin/php5 -f",
"shell_command_is_shell": false,

And the process tree is

python,4302 /usr/local/bin/gateone --settings_dir=/opt/itsat/etc/gateone
+-/usr/bin/php5 -f /opt/itsat/usr/bin/rcpsh ,4424

This commit saves 1 process ( a shell ) by opened terminal when you want to exec another binary command that is not a shell.( php5 in my case) and is necesary to avoid the sleep .1 attached to the command. And also enables faster executions.