45 lines
1.3 KiB
Bash
Executable File
45 lines
1.3 KiB
Bash
Executable File
#!/bin/sh
|
|
### BEGIN INIT INFO
|
|
# Provides: S99broker
|
|
# Required-Start: $remote_fs $syslog
|
|
# Required-Stop: $remote_fs $syslog
|
|
# Default-Start: 2 3 4 5
|
|
# Default-Stop: 0 1 6
|
|
# Short-Description: OreBolt OS master broker (h2_test launcher)
|
|
# Description: Boots the LVGL UI and registers all 17 OreBolt OS modules.
|
|
### END INIT INFO
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
#
|
|
# v1.4: exports KERNEL_HEADERS-aware environment for any module that needs
|
|
# to introspect its build-time header set (used by probe.mod).
|
|
|
|
DAEMON=/usr/bin/h2_test
|
|
PIDFILE=/var/run/orebolt-broker.pid
|
|
|
|
case "$1" in
|
|
start)
|
|
echo "[*] Starting OreBolt OS broker..."
|
|
# Set system volumes to absolute hardware maximum for baseline unity gain
|
|
amixer sset 'Master' 100% unmute 2>/dev/null
|
|
amixer sset 'Headphone' 100% unmute 2>/dev/null
|
|
export OREBOLT_VERSION=1.7
|
|
export OREBOLT_TARGET_SOC=X1000E
|
|
start-stop-daemon -S -b -m -p "$PIDFILE" -x "$DAEMON"
|
|
;;
|
|
stop)
|
|
echo "[*] Stopping OreBolt OS broker..."
|
|
start-stop-daemon -K -p "$PIDFILE" || true
|
|
rm -f "$PIDFILE"
|
|
;;
|
|
restart)
|
|
"$0" stop
|
|
"$0" start
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
exit 0
|