I want to run 2 commands when a Beaglebone AI with Debian 10 starts up. The first one, which is a C code to initialize a Circular Microphone Board, it works (CMBini).
However, the second one it does not. It is a script it is a PTP network command (ptp4l -A -H -q -s), and I think that the problem might be that it is a command that stays running and printing results until cancelled with Ctrl+C.
So my question is how can I make this work? Is there anyway to keep that process running in the background?
My crontab file:
@reboot /home/debian/CMBini
@reboot /home/debian/startsript.sh
startscript.sh:
#! bin/bash
sleep 20
ptp4l -A -H -q -s -i eth0
sleep 40
phc2sys -a -rr
I tried your crontab on macOS 12.6:
With this in
.boot-screenrc:The commands failed (ptp4l & phc2sys), but screen ran them. So if they commands work on your system this is a solution.
This also allows you to attach to the session via:
From there you can view the commands it executed.