<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 18/02/17 18:30, Ed via
      Dxspider-support wrote:<br>
    </div>
    <blockquote cite="mid:20170218133041.1ac3e041@w3nr" type="cite"><br>
      <pre wrap="">#! /bin/sh

### BEGIN INIT INFO
# Provides: dxspider
# Required-Start: $local_fs
# Required-Stop:
# Default-Start: 1 2 3 4 5
# Default-Stop:
### END INIT INFO

<font color="#cc0000">/spider/perl/cluster.pl</font>    #1 as root

case $1 in
        start|restart|force-reload)
        <font color="#cc0000">/spider/perl/cluster.pl</font>    #2 as root
        ;;
        stop)
        ;;
        status)# cluster startup/respawn
#

>From init::


start on runlevel [2345]
stop on runlevel [!2345]

respawn

<font color="#cc0000">exec /bin/su - sysop -c "usr/bin/ perl -w /spider/perl/cluster.pl" /dev/tty6  #3 as sysop (but with incorrect syntax)
</font>

</pre>
    </blockquote>
    <br>
    I must confess that I am a bit confused by this. But if this is
    meant to be a standard init.d start script then, I am afraid, it
    will not do what you want. In it you will have attempted to start
    the node a total of <font color="#cc0000">three</font> times. I am
    also mildly surprised that it does not hang the startup of the
    operating system. <br>
    <br>
    Basically, there are four standard ways of setting this up. The
    first way is easiest, but won't restart if you stop the node. The
    other three will. <br>
    <br>
    1. In the file /etc/rc.local put<br>
    <br>
    /bin/su -c "/usr/bin/perl -w /spider/perl/cluster.pl >
    /dev/null&" sysop <br>
    exit 0<br>
    <br>
    2. If there is a file called /etc/inittab<br>
    <br>
    Add a line that looks like:<br>
    <br>
    dx:2345:respawn:/bin/su -c "/usr/bin/perl -w /spider/perl/cluster.pl
    > /dev/null 2>&1 &" sysop <br>
    <br>
    then run "telinit q"<br>
    <br>
    3. If there is an /etc/init directory and/or you know that you are
    running some kind of ubuntu linux distro <= 14.04 then create a
    file called /etc/init/dxspider.conf and put this into it:<br>
    <br>
    ----------------------- cut -----------------------<br>
    #DXSpider startup script<br>
    #<br>
    # This service maintains a copy of dxspider from the point the
    system is<br>
    # started until it is shut down again.<br>
    <br>
    description "DXSpider DX Cluster"<br>
    start on filesystem<br>
    stop on runlevel S<br>
    <br>
    respawn<br>
    umask 0002<br>
    exec su -c "/usr/bin/perl -w /spider/perl/cluster.pl >/dev/null
    2>&1" sysop<br>
    ----------------------- cut -----------------------<br>
    <br>
    You will probably need to reboot to make this active.<br>
    <br>
    4. You have Debian Jessie or Ubuntu > 14.04 and/or you know your
    are running systemd (do a ps ax and look at the name of the process
    for pid 1). In this case you will need to create a file called
    /etc/systemd/system/dxspider.service and put the following into it:<br>
    <br>
    ----------------------- cut -----------------------<br>
    [Unit]<br>
    Description=DXSpider DX Cluster node<br>
    After=network.target auditd.service<br>
    <br>
    [Service]<br>
    EnvironmentFile=-/etc/default/dxspider<br>
    ExecStart=/spider/perl/cluster.pl > /dev/null 2>&1<br>
    ExecReload=/bin/kill -HUP $MAINPID<br>
    KillMode=process<br>
    Restart=on-failure<br>
    RestartPreventExitStatus=255<br>
    User=sysop<br>
    Group=sysop<br>
    <br>
    [Install]<br>
    WantedBy=multi-user.target<br>
    Alias=dxspider.service<br>
    ----------------------- cut -----------------------<br>
    <br>
    Again, the easiest way to check this is working is to reboot.<br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
  </body>
</html>