Example of JobServer init file - 6.1

Talend Data Services Platform Installation Guide

EnrichVersion
6.1
EnrichProdName
Talend Data Services Platform
task
Installation and Upgrade
EnrichPlatform
Talend Activity Monitoring Console
Talend Administration Center
Talend Artifact Repository
Talend CommandLine
Talend DQ Portal
Talend ESB
Talend Identity Management
Talend Installer
Talend JobServer
Talend Log Server
Talend Project Audit
Talend Repository Manager
Talend Runtime
Talend SAP RFC Server
Talend Studio

On Redhat

  1. Create/Copy the following script to the /etc/init.d/jobserver file:

    # chkconfig: 345 91 10
    # description: Starts and stops the jobserver daemon.
    #
    
    # Source function library.
    . /etc/rc.d/init.d/functions
    
    # Get config.
    . /etc/sysconfig/network
    

    # Check that networking is up.
    [ "${NETWORKING}" = "no" ] && exit 0
    
    user=cxp
    jobserver=/u/bin/Talend/jobserver_3.0.1
    startup=start_rs.sh
    shutdown=stop_rs.sh
    
    
    start(){
     echo -n $"Starting jobserver service: "
     su - $user -c "cd $jobserver && sh $startup &" 
     RETVAL=$?
     echo
    }
    
    stop(){
     echo -n $ "Stopping jobserver service: "
     su - $user -c  "cd $jobserver && sh $shutdown"
     RETVAL=$?
     echo
    }
    
    restart() {
     stop
     start
    }
    
    # See how we were called.
    case "$1" in
    start)
     start
     ;;
    stop)
     stop
     ;;
    restart)
     restart
     ;;
    *)
     echo $"Usage: $0 {start|stop|restart}"
     exit 1
    esac
    
    exit 0

  2. Edit the user and jobserver variable values in the script (with the dedicated user to run Talend, and the JobServer path respectively).

  3. To make sure that the script is executable, type:

    # chmod 0755 /etc/init.d/jobserver

  4. Type in:

    chkconfig --list

    chkconfig --add jobserver

    Now, you can test this self-defined service.

On OpenSuse

The following operation needs to be performed with root privileges.

Note

This procedure was tested on OpenSuse 11.2 x64 bits.

  1. Make sure that the three scripts jobserver_start, jobserver_stop and jobserver are executable.

  2. Copy usr/bin/jobserver_start and usr/bin/jobserver_stop into:

    /usr/bin/

  3. Copy etc/ini.d/jobserver in:

    /etc/init.d/

  4. Edit the configuration file etc/sysconfig/jobserver and set the path to your installation directory.

  5. Copy this file into:

    /etc/sysconfig/

  6. Execute the following command to create a link called rcjobserver:

    ln -s /etc/init.d/jobserver /usr/sbin/rcjobserver

  7. To start or stop the JobServer manually, use:

    rcjobserver start

    rcjobserver stop

  8. Install the service using:

    Yast > System > System Services

  9. Type in:

    chkconfig -e jobserver

  10. Set the variable to ON

  11. Run SuSEconfig.

    Note

    The JobServer installation path can be edited through Yast > /etc/sysconfig Editor in Applications/Talend.