make LED welcome a service

pull/182/head
Yossi 2018-04-28 09:52:33 +03:00
parent 6784c4f00a
commit a4e4ea59f8
7 changed files with 24 additions and 25 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View 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

View File

@ -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

View File

@ -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

View File

@ -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