migrate services to systemctl 🚀
This commit is contained in:
parent
c6d11b1e5c
commit
6087251483
|
@ -5,10 +5,13 @@
|
|||
# Do not include if you are building for RPiZW
|
||||
|
||||
|
||||
install -m 755 files/etc_initd_dride-ws ${ROOTFS_DIR}/etc/init.d/dride-ws
|
||||
install -m 755 files/etc_initd_dride-core ${ROOTFS_DIR}/etc/init.d/dride-core
|
||||
install -m 644 files/lib_udev_hwclock-set ${ROOTFS_DIR}/lib/udev/hwclock-set
|
||||
|
||||
install -m 644 files/systemctl/ble.service ${ROOTFS_DIR}/lib/systemd/system/ble.service
|
||||
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
|
||||
|
||||
on_chroot << EOF
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
@ -110,11 +113,12 @@ sudo pip install pyserial
|
|||
|
||||
|
||||
# express on startup
|
||||
sudo update-rc.d dride-ws defaults
|
||||
sudo systemtl enable ws
|
||||
|
||||
# dride-core on startup
|
||||
sudo update-rc.d dride-core defaults
|
||||
|
||||
sudo systemtl enable record
|
||||
sudo systemtl enable ble
|
||||
|
||||
|
||||
if [ ${OS_TYPE} == "dride-plus" ]; then
|
||||
|
|
|
@ -20,13 +20,6 @@ case "$1" in
|
|||
echo "Starting dride-core"
|
||||
#blink LED
|
||||
sudo python /home/core/modules/indicators/python/states/standalone.py welcome
|
||||
|
||||
# start recording
|
||||
sudo nice -n -19 node /home/core/modules/video/index.js &
|
||||
|
||||
# run button / bluetooth daemon
|
||||
sudo python /home/core/daemons/bluetooth/initPin.py &
|
||||
sudo BLENO_DEVICE_NAME="dride" node /home/core/daemons/bluetooth/main.js &
|
||||
;;
|
||||
stop)
|
||||
echo "Stopping dride-core"
|
||||
|
|
18
stage2/06-dride-base/files/systemctl/ble.service
Normal file
18
stage2/06-dride-base/files/systemctl/ble.service
Normal file
|
@ -0,0 +1,18 @@
|
|||
[Unit]
|
||||
Description=Control record proccess in your Dride
|
||||
Documentation=https://dride.io/documentation
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Environment=BLENO_DEVICE_NAME=dride
|
||||
Type=simple
|
||||
User=pi
|
||||
ExecStart=/usr/bin/node /home/core/daemons/bluetooth/main.js
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
|
||||
|
||||
|
18
stage2/06-dride-base/files/systemctl/record.service
Normal file
18
stage2/06-dride-base/files/systemctl/record.service
Normal file
|
@ -0,0 +1,18 @@
|
|||
[Unit]
|
||||
Description=Control record proccess in your Dride
|
||||
Documentation=https://dride.io/documentation
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Environment=NODE_PORT=3001
|
||||
Type=simple
|
||||
User=pi
|
||||
ExecStart=/usr/bin/node /home/core/modules/video/index.js
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
|
||||
|
||||
|
17
stage2/06-dride-base/files/systemctl/ws.service
Normal file
17
stage2/06-dride-base/files/systemctl/ws.service
Normal file
|
@ -0,0 +1,17 @@
|
|||
[Unit]
|
||||
Description=Control record proccess in your Dride
|
||||
Documentation=https://dride.io/documentation
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=pi
|
||||
ExecStart=/usr/bin/node /home/core/dride-ws/server/app.js
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-libav
|
||||
xpdf gtk2-engines alsa-utils
|
||||
desktop-base
|
||||
git
|
||||
omxplayer
|
||||
raspberrypi-artwork
|
||||
policykit-1
|
||||
gvfs
|
||||
rfkill
|
||||
chromium-browser rpi-chromium-mods
|
||||
gldriver-test
|
||||
fonts-droid-fallback
|
||||
fonts-liberation2
|
||||
obconf
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
rm -f "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d/wait.conf"
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
if [ ! -d "${ROOTFS_DIR}" ]; then
|
||||
copy_previous
|
||||
fi
|
Loading…
Reference in New Issue
Block a user