grblhal-glowforge: recipe with boot autostart

gitsm-pinned build of the controller with a sysvinit script (defaults 92, after forgectrl), installed in both images. Reboot-verified on the bench: controller and forgectrl come up unattended and Grbl answers on TCP:23.
This commit is contained in:
ScottW514
2026-08-03 17:22:07 -04:00
parent 7b320c34ac
commit 061def2343
5 changed files with 81 additions and 9 deletions
@@ -0,0 +1,36 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: grblhal
# Required-Start: $local_fs
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: grblHAL motion controller (Grbl over TCP:23)
### END INIT INFO
DAEMON=/usr/bin/grblHAL_glowforge
PIDFILE=/var/run/grblhal.pid
LOG=/data/glowforge.log
case "$1" in
start)
echo "Starting grblHAL"
start-stop-daemon -S -q -p $PIDFILE -m -b -x /bin/sh -- \
-c "cd /data && GFSINK=/dev/glowforge exec $DAEMON -p 23 -e /data/EEPROM-glowforge.DAT >> $LOG 2>&1"
;;
stop)
echo "Stopping grblHAL"
start-stop-daemon -K -q -p $PIDFILE
rm -f $PIDFILE
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
exit 0