node-red autostart

This commit is contained in:
justmarvinn 2025-02-23 13:02:58 +02:00
parent b0ebfe390c
commit a879a61a2a
3 changed files with 40 additions and 2 deletions

View File

@ -43,8 +43,6 @@ BUILDROOT_DEFCONFIG=${SDK_CONFIG_DIR}/buildroot_defconfig
UBUNTU_DIR=${SDK_SYSDRV_DIR}/tools/board/ubuntu
KERNEL_PATH=${SDK_SYSDRV_DIR}/source/kernel
UBOOT_PATH=${SDK_SYSDRV_DIR}/source/uboot/u-boot
#for custom rootfs
CUSTOM_ROOT=${SDK_ROOT_DIR}/custom_root
export RK_JOBS=$(($(getconf _NPROCESSORS_ONLN) / 2 + 1))
export RK_BUILD_VERSION_TYPE=RELEASE

View File

@ -0,0 +1,39 @@
#!/bin/sh
#
# Starts NodeRED.
#
start() {
printf "Starting node-red: "
/usr/bin/node-red
touch /var/lock/node-red
echo "OK"
}
stop() {
printf "Stopping node-red: "
killall node-red
rm -f /var/lock/node-red
echo "OK"
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?

View File

@ -17,6 +17,7 @@ BR2_TARGET_GENERIC_ISSUE="Welcome to luckfox pico"
BR2_TARGET_GENERIC_ROOT_PASSWD="luckfox"
BR2_SYSTEM_BIN_SH_BASH=y
BR2_SYSTEM_ENABLE_NLS=y
BR2_ROOTFS_OVERLAY="../../../../rootfs_overlay"
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
BR2_PACKAGE_GIT=y
BR2_PACKAGE_E2FSPROGS=y