[Dxspider-support] Help & Questions

Bill Shell n6ws at n6ws.com
Sat Feb 18 22:02:35 GMT 2017


Ed,
Ed,
Your comments of /spider/perl/cluster.pl running as root is wrong. Your 
dxspider process configuration file /etc/init/dxspider.conf should 
define the run levels and owner of the process.  In the example you 
gave, it has /spider/perl/cluster.pl running as a process as sysop.
-Bill


On 2/18/2017 1:39 PM, Dirk Koopman via Dxspider-support wrote:
> On 18/02/17 18:30, Ed via Dxspider-support wrote:
>>
>> #! /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
>>
>> /spider/perl/cluster.pl     #1 as root
>>
>> case $1 in
>>          start|restart|force-reload)
>>          /spider/perl/cluster.pl     #2 as root
>>          ;;
>>          stop)
>>          ;;
>>          status)# cluster startup/respawn
>> #
>>
>>  From init::
>>
>>
>> start on runlevel [2345]
>> stop on runlevel [!2345]
>>
>> respawn
>>
>> exec /bin/su - sysop -c "usr/bin/ perl -w /spider/perl/cluster.pl" 
>> /dev/tty6 #3 as sysop (but with incorrect syntax)
>>
>
> 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 three times. I am also mildly surprised that it does not hang the 
> startup of the operating system.
>
> 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.
>
> 1. In the file /etc/rc.local put
>
> /bin/su -c "/usr/bin/perl -w /spider/perl/cluster.pl > /dev/null&" sysop
> exit 0
>
> 2. If there is a file called /etc/inittab
>
> Add a line that looks like:
>
> dx:2345:respawn:/bin/su -c "/usr/bin/perl -w /spider/perl/cluster.pl > 
> /dev/null 2>&1 &" sysop
>
> then run "telinit q"
>
> 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:
>
> ----------------------- cut -----------------------
> #DXSpider startup script
> #
> # This service maintains a copy of dxspider from the point the system is
> # started until it is shut down again.
>
> description "DXSpider DX Cluster"
> start on filesystem
> stop on runlevel S
>
> respawn
> umask 0002
> exec su -c "/usr/bin/perl -w /spider/perl/cluster.pl >/dev/null 2>&1" 
> sysop
> ----------------------- cut -----------------------
>
> You will probably need to reboot to make this active.
>
> 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:
>
> ----------------------- cut -----------------------
> [Unit]
> Description=DXSpider DX Cluster node
> After=network.target auditd.service
>
> [Service]
> EnvironmentFile=-/etc/default/dxspider
> ExecStart=/spider/perl/cluster.pl > /dev/null 2>&1
> ExecReload=/bin/kill -HUP $MAINPID
> KillMode=process
> Restart=on-failure
> RestartPreventExitStatus=255
> User=sysop
> Group=sysop
>
> [Install]
> WantedBy=multi-user.target
> Alias=dxspider.service
> ----------------------- cut -----------------------
>
> Again, the easiest way to check this is working is to reboot.
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Dxspider-support mailing list
> Dxspider-support at dxcluster.org
> http://mailman.tobit.co.uk/mailman/listinfo/dxspider-support

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.tobit.co.uk/pipermail/dxspider-support/attachments/20170218/4a1cca0a/attachment-0001.html>


More information about the Dxspider-support mailing list