From 9101d7f604f5566e6cee2c980beea2bab69bcf87 Mon Sep 17 00:00:00 2001 From: brindosch Date: Thu, 30 Jun 2016 17:30:25 +0200 Subject: [PATCH] systemd: add oe/le systemd, mod systemd file (#78) * cleanup: remove ambiled device as written at the forum this is no longer supported. All people should move to adalight. They just need to flash a new sketch. * fix typo * travis.ci * travis: move to ubuntu 14.04 * script try * add serialport * update .json files * . * . * . * update travis * fix * typo * fix * . * disable v4l2 on mac * disable email notification * update osx * maybe fix * . * disable osx and rm v4l2 * try osx * try fix * travis update * add oe systemd file --- .travis/travis_build.sh | 5 +++-- bin/service/hyperion.systemd.OE.LE.sh | 12 ++++++++++++ bin/service/hyperion.systemd.sh | 12 ++++++------ 3 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 bin/service/hyperion.systemd.OE.LE.sh diff --git a/.travis/travis_build.sh b/.travis/travis_build.sh index ae28b7cd..571e0564 100644 --- a/.travis/travis_build.sh +++ b/.travis/travis_build.sh @@ -1,10 +1,11 @@ #!/bin/bash # compile hyperion on osx if [[ $TRAVIS_OS_NAME == 'osx' ]]; then - mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=ON .. && make -j$(nproc) package + cmake . -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.6.1-1 + mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=ON -Wno-dev .. && make -j$(nproc) package fi # compile hyperion on linux if [[ $TRAVIS_OS_NAME == 'linux' ]]; then - mkdir build && cd build && cmake -DPLATFORM=x86 -DCMAKE_BUILD_TYPE=Release -DENABLE_AMLOGIC=ON -DENABLE_TESTS=ON -DENABLE_SPIDEV=ON .. && make -j$(nproc) package + mkdir build && cd build && cmake -DPLATFORM=x86 -DCMAKE_BUILD_TYPE=Release -DENABLE_AMLOGIC=ON -DENABLE_TESTS=ON -DENABLE_SPIDEV=ON -Wno-dev .. && make -j$(nproc) package fi diff --git a/bin/service/hyperion.systemd.OE.LE.sh b/bin/service/hyperion.systemd.OE.LE.sh new file mode 100644 index 00000000..6224f917 --- /dev/null +++ b/bin/service/hyperion.systemd.OE.LE.sh @@ -0,0 +1,12 @@ +[Unit] +Description=Hyperion ambient light systemd service for OpenELEC/LibreELEC/RasPlex +After=graphical.target + +[Service] +ExecStart=/bin/sh -c "exec sh /storage/hyperion/bin/hyperiond.sh /storage/.config/hyperion/hyperion.config.json" +TimeoutStopSec=2 +Restart=always +RestartSec=2 + +[Install] +WantedBy=default.target diff --git a/bin/service/hyperion.systemd.sh b/bin/service/hyperion.systemd.sh index 1ec4124c..23faaf20 100644 --- a/bin/service/hyperion.systemd.sh +++ b/bin/service/hyperion.systemd.sh @@ -1,15 +1,15 @@ [Unit] -Description=Hyperion Systemd service +Description=Hyperion ambient light systemd service [Service] Type=simple -User=root -Group=root -UMask=007 +User=hyperion +Group=hyperion ExecStart=/usr/bin/hyperiond /etc/hyperion/hyperion.config.json ExecReload=/bin/kill -HUP $MAINPID -Restart=on-failure -TimeoutStopSec=10 +TimeoutStopSec=2 +Restart=always +RestartSec=2 [Install] WantedBy=multi-user.target