burrow-pi-img/stage3/03-nodejs/01-run.sh
2017-09-06 11:06:13 +03:00

15 lines
529 B
Bash
Executable File

#!/bin/bash -e
export NODE_SERVICE_DIR=node-service
git clone https://github.com/node-red/raspbian-deb-package.git ${NODE_SERVICE_DIR}
install -m 644 ${NODE_SERVICE_DIR}/resources/nodered.service ${ROOTFS_DIR}/lib/systemd/system/
install -m 755 ${NODE_SERVICE_DIR}/resources/node-red-start ${ROOTFS_DIR}/usr/bin
install -m 755 ${NODE_SERVICE_DIR}/resources/node-red-stop ${ROOTFS_DIR}/usr/bin
install -m 755 ${NODE_SERVICE_DIR}/resources/node-red-log ${ROOTFS_DIR}/usr/bin
on_chroot << EOF
systemctl enable nodered
EOF