Created a file called aisstart.sh in /home/pi
Inside the file it says
sudo service kplex start
sudo kplex file:direction=out
Then
chmod -755 /home/pi/aisstart.sh
And added it to rc.local with and without bash
bash /home/pi/aisstart.sh &
#!/bin/sh -e
## rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
# By default this script does nothing.
exit 0
I can run the script and rc.local manually but it will not run at start up.
When that didn't work I removed it from rc.local and added it as a cron job using:
@reboot sleep 10 cd/home/pi && /bin/bash aisstart.sh
With and without the sleep.
Is there something simple I am missing or a better way?
Is there something simple I am missing or a better way?
ExecStop=/usr/bin/pkill -9 kplex # Merci à Keith
ExecReload=/usr/bin/pkill -1 kplex # de placer les bonnes commandes ici
--
I've got kplex auto starting on the latest raspbian on a pi3. I've also added a systemd service to create some symlinks I couldn't do in udev for USB serial devices. If I can get my laptop charged I'll share them.
--
You received this message because you are subscribed to the Google Groups "kplex" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kplex+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kplex/9b0af5d2-919c-4a13-9a9a-dea450b3ab0c%40googlegroups.com.
Did you every sus out why the scripts won't run on the newer versions of Raspbian? I've also tried a number of ways and can't figure it out.
I'm using it on the latest version Jessie and Pi3 B+ and it is
working normal
Henk
--
You received this message because you are subscribed to the Google Groups "kplex" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kplex+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kplex/839580d8-ee37-4117-8aa0-5d05d187a05b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Henk van Heuveln
Owner
| Service Technician
+1
(902) 229 0858 | he...@seacoastmarine.ca
Seacoast
Marine Electronics Ltd.
102
Chain Lake Drive, Unit 5 | Halifax, NS | B3S 1A7
Check
out our website at:
www.seacoastmarine.ca
sudo update-rc.d kplex defaults
Which is the "normal" mechanism for startup on boot? In this thread some people were raising the issue that on some newer distributions this is not placing kplex start-up at the appropriate place in the boot sequence after all devices have come on line althought his does not seem to be such an issue with fresh installs.
If you didn't do the above give it a go. If it doesn't work we can go through use of the unit file for startup.
I haven't devoted time to this recently but should have a little more time on my hands for open source work from next month
Hi - Yes, I did do that. I am running on a Raspberry Pi. I did not see a file called rc.d, however there is one called rc.local. Is it possible that I should have used rc.local in the command instead?
Any suggestions how to fix it please? I have tried every version of shell scripts to no avail.
A belated thank you Keith for the March 11, 2020 fix which appear to have solved a multiyear battle with the kplex startup after reboot on my Raspberry AIS receiver. Over time I mitigated using cron with a 30 sec delay on kplexstartup, (I never used sudo update-rc.d kplex defaults )
@reboot /bin/sleep 30 ; /usr/bin/kplexstartup > / home/pi/crontablog.log
I never understood crontab -e vs sudo crontab -e so I used both every time to be sure) - and this mitigation still worked on my Stretch-to-Bullseye upgraded SD card until now.
But my decision to move the upgraded Stretch-to-Bullseye to a USB Flash configuration turned out to be unsuccessful so I made a new AIS receiver from scratch on a fresh Bullseye on Flash USB, only to find that kplex would no longer start after boot, not even after a 180 sec cron delay.
But now with your fix below kplex starts up after reboot, without the crontabs.
* kill kplex
sudo service kplex stop
* Move its init file aside:
sudo mv /etc/init.d/kplex /etc/init.d/kplex.back
* Remove the sysV startup links:
sudo update-rc.d kplex remove
* link in the kplex unit file:
sudo ln -s /usr/share/kplex/kplex.service /etc/systemd/system/
* enable it:
sudo systemctl enable kplex
* Reboot
Thanks Keith also for your follow-up on other KPLEX configuration issues