From 93a30d21b44062e6a1d36dd016906b9c564d8ff5 Mon Sep 17 00:00:00 2001 From: Yossi Date: Sun, 8 Apr 2018 16:39:52 +0300 Subject: [PATCH] Add service for live preview --- stage2/06-dride-base/00-run.sh | 1 + .../06-dride-base/files/systemctl/ble.service | 2 +- .../06-dride-base/files/systemctl/live.service | 17 +++++++++++++++++ .../files/systemctl/record.service | 2 +- stage2/06-dride-base/files/systemctl/ws.service | 2 +- 5 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 stage2/06-dride-base/files/systemctl/live.service diff --git a/stage2/06-dride-base/00-run.sh b/stage2/06-dride-base/00-run.sh index b4e18ce..372fdeb 100755 --- a/stage2/06-dride-base/00-run.sh +++ b/stage2/06-dride-base/00-run.sh @@ -11,6 +11,7 @@ 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 +install -m 644 files/systemctl/live.service ${ROOTFS_DIR}/lib/systemd/system/live.service on_chroot << EOF diff --git a/stage2/06-dride-base/files/systemctl/ble.service b/stage2/06-dride-base/files/systemctl/ble.service index 934a8bf..6876447 100644 --- a/stage2/06-dride-base/files/systemctl/ble.service +++ b/stage2/06-dride-base/files/systemctl/ble.service @@ -1,5 +1,5 @@ [Unit] -Description=Control record proccess in your Dride +Description=Control the BLE service of your Dride Documentation=https://dride.io/documentation After=network.target diff --git a/stage2/06-dride-base/files/systemctl/live.service b/stage2/06-dride-base/files/systemctl/live.service new file mode 100644 index 0000000..d09e63b --- /dev/null +++ b/stage2/06-dride-base/files/systemctl/live.service @@ -0,0 +1,17 @@ +[Unit] +Description=Control the live mode service of your Dride +Documentation=https://dride.io/documentation +After=network.target + +[Service] +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 + +[Install] +WantedBy=multi-user.target + + + + diff --git a/stage2/06-dride-base/files/systemctl/record.service b/stage2/06-dride-base/files/systemctl/record.service index a07fceb..edaa265 100644 --- a/stage2/06-dride-base/files/systemctl/record.service +++ b/stage2/06-dride-base/files/systemctl/record.service @@ -1,5 +1,5 @@ [Unit] -Description=Control record proccess in your Dride +Description=Control the Record service of your Dride Documentation=https://dride.io/documentation After=network.target diff --git a/stage2/06-dride-base/files/systemctl/ws.service b/stage2/06-dride-base/files/systemctl/ws.service index 8821d13..5c8f1e1 100644 --- a/stage2/06-dride-base/files/systemctl/ws.service +++ b/stage2/06-dride-base/files/systemctl/ws.service @@ -1,5 +1,5 @@ [Unit] -Description=Control record proccess in your Dride +Description=Control the web service service of your Dride Documentation=https://dride.io/documentation After=network.target