To install JobServer as a service, proceed as follows:
Create an xml file named talend_agent.xml,
Place this file under the following path
/var/svc/manifest/application/
Include the following commands to the file you've just created:
<?xml version="1.0"?> <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> <service_bundle type='manifest' name='talend_agent'> <service name='application/talend_agent' type='service' version='1'> <create_default_instance enabled='true' /> <single_instance/> <exec_method type='method' name='start' exec='/lib/svc/method/talend_agent start' timeout_seconds='150' /> <exec_method type='method' name='stop' exec='/lib/svc/method/talend_agent stop' timeout_seconds='150' /> <template> <common_name> <loctext xml:lang='C'> JobServer Agent: Talend component </loctext> </common_name> <documentation> <manpage title='Talend JobServer agent' section='5' /> <doc_link name='talend.com' uri='http://talend.com'/> </documentation> </template> </service> </service_bundle> <>
Then create a file named talend_agent.
Place it under
/lib/svc/method
In this file, type in the script that will be called when enabling/disabling the service:
#!/bin/sh case "$1" in 'start') cd <JobServerPath> sh start_rs.sh & ;; 'stop') cd <JobServerPath> sh stop_rs.sh ;; *) echo "Usage: $0 {start|stop}" exit 1 ;; esac exit 0
You can now import the configuration file using the following command:
svccfg import /var/svc/manifest/application/talend_agent.xml
You can also enable the service using the following command:
svcadm enable talend_agent
And you can also make sure that the service is running using the following command:
svcs | grep talend
And checking that the output is:
online Apr_20 svc:/application/talend_agent:default