To install CommandLine as a service on Linux:
Create an executable from which commandline can be run in the directory /usr/bin.
To do this, you need to create two files, commandline_start and commandline_stop containing the following:
#!/bin/sh cd <CommandLinePath> nohup sh commandline-linux.sh&
The path <CommandLinePath> should be absolute.
#!/bin/sh (echo stopServer ; sleep 2) | telnet localhost 8002
Ensure that the two files above are executable. To do this, you can execute the two commands below in the /usr/bin directory:
# chmod +x /usr/bin/commandline_start # chmod +x /usr/bin/commandline_stop
Paste the sh file: /<CommandLinePath> /addons/scripts/talend_commandline into the directory: /etc/init.d in order to create the service related to the two executables above.
Make the file executable using:
# chmod +x /etc/init.d/talend_commandline_commandline
Execute the following command:
# update-rc.d talend_commandline_commandline defaults 60
Now you have created the service, related to the two executable files commandline_start and commandline_stop.