make LED welcome a service
This commit is contained in:
parent
6784c4f00a
commit
a4e4ea59f8
|
@ -12,9 +12,7 @@ install -m 644 files/systemctl/ble.service ${ROOTFS_DIR}/lib/systemd/system/ble.
|
|||
install -m 644 files/systemctl/record.service ${ROOTFS_DIR}/lib/systemd/system/record.service
|
||||
install -m 644 files/systemctl/ws.service ${ROOTFS_DIR}/lib/systemd/system/ws.service
|
||||
install -m 644 files/systemctl/live.service ${ROOTFS_DIR}/lib/systemd/system/live.service
|
||||
|
||||
# update rc.local with the welome LED
|
||||
install -m 644 files/rc.local ${ROOTFS_DIR}/etc/rc.local
|
||||
install -m 644 files/systemctl/led.service ${ROOTFS_DIR}/lib/systemd/system/led.service
|
||||
|
||||
on_chroot << EOF
|
||||
|
||||
|
@ -123,6 +121,7 @@ sudo systemctl enable ws
|
|||
sudo update-rc.d dride-core defaults
|
||||
sudo systemctl enable record
|
||||
sudo systemctl enable ble
|
||||
sudo systemctl enable led
|
||||
|
||||
if [ ${OS_TYPE} == "dride-plus" ]; then
|
||||
## GPS https://www.raspberrypi.org/forums/viewtopic.php?p=947968#p947968
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
#!/bin/sh -e
|
||||
#
|
||||
# rc.local
|
||||
#
|
||||
# This script is executed at the end of each multiuser runlevel.
|
||||
# Make sure that the script will "exit 0" on success or any other
|
||||
# value on error.
|
||||
#
|
||||
# In order to enable or disable this script just change the execution
|
||||
# bits.
|
||||
#
|
||||
# By default this script does nothing.
|
||||
|
||||
# Print the IP address
|
||||
/home/core/modules/led/bin/main welcome
|
||||
|
||||
_IP=$(hostname -I) || true
|
||||
if [ "$_IP" ]; then
|
||||
printf "My IP address is %s\n" "$_IP"
|
||||
fi
|
||||
|
||||
exit 0
|
|
@ -9,6 +9,7 @@ Type=simple
|
|||
User=root
|
||||
ExecStart=/usr/bin/node /home/core/daemons/bluetooth/main.js
|
||||
Restart=on-failure
|
||||
RestartSec=1
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
18
stage2/06-dride-base/files/systemctl/led.service
Normal file
18
stage2/06-dride-base/files/systemctl/led.service
Normal file
|
@ -0,0 +1,18 @@
|
|||
[Unit]
|
||||
Description=Control the LED of your Dride
|
||||
Documentation=https://dride.io/documentation
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=pi
|
||||
ExecStart=/home/core/modules/led/bin/main welcome
|
||||
Restart=on-failure
|
||||
RestartSec=1
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
|
||||
|
||||
|
|
@ -8,6 +8,7 @@ Type=simple
|
|||
User=pi
|
||||
ExecStart=/opt/vc/bin/raspivid -t 0 -w 640 -h 480 -fps 25 -l -o tcp://0.0.0.0:3333
|
||||
Restart=on-failure
|
||||
RestartSec=1
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -9,6 +9,7 @@ Type=simple
|
|||
User=pi
|
||||
ExecStart=/usr/bin/node /home/core/modules/video/index.js
|
||||
Restart=on-failure
|
||||
RestartSec=1
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -8,6 +8,7 @@ Type=simple
|
|||
User=pi
|
||||
ExecStart=/usr/bin/node /home/core/dride-ws/server/app.js
|
||||
Restart=on-failure
|
||||
RestartSec=1
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
Loading…
Reference in New Issue
Block a user