[Dxspider-support] Looking for an auto connect script

Tony K1AX k1ax at outlook.com
Wed Apr 24 16:25:10 BST 2024


I'm trying to create a shell script that works with systemd service to automatically connect to a dxspider node each time the server is re-booted. I'm having issues doing this by piping the connect command to console.pl. Anyone already have a script that does this?

This is what I have so far, but it's not working:

systemd service file:
/usr/lib/systemd/system/dxspider.service
----------------------------------------
[Unit]
Description= DxSpider DXCluster service
After=network.target

[Service]
Type=simple
User=sysop
Group=sysop
ExecStart=/usr/local/bin/dxspider_startup.sh
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Environment="PERL5LIB=/home/sysop/spider/local:/home/sysop/spider/perl"
StandardOutput=journal
Restart=always

[Install]
WantedBy=multi-user.target


Shell script:
/usr/local/bin/dxspider_startup.sh:
-----------------------------------
#!/bin/bash
# Start the DxSpider Cluster
/usr/bin/perl -w /spider/perl/cluster.pl

# Wait for 5 seconds for cluster.pl to fully load
sleep 5

# Pipe the connect command to console.pl
echo "connect wr3d" | /spider/perl/console.pl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.tobit.co.uk/pipermail/dxspider-support/attachments/20240424/4790c4ce/attachment.htm>


More information about the Dxspider-support mailing list