Skip to content

Instantly share code, notes, and snippets.

@HiassofT
Created March 21, 2016 13:26
Show Gist options
  • Save HiassofT/b5ada3a42b4756effce1 to your computer and use it in GitHub Desktop.
Save HiassofT/b5ada3a42b4756effce1 to your computer and use it in GitHub Desktop.
diff --git a/packages/addons/service/hyperion/source/bin/hyperiond.start b/packages/addons/service/hyperion/source/bin/hyperiond.start
index ca77dc4..5044aaa 100644
--- a/packages/addons/service/hyperion/source/bin/hyperiond.start
+++ b/packages/addons/service/hyperion/source/bin/hyperiond.start
@@ -18,4 +18,11 @@
oe_setup_addon service.hyperion
-exec hyperiond $ADDON_HOME/hyperion.config.json
+if [ -f $ADDON_HOME/hyperion.config.json ] ; then
+ exec hyperiond $ADDON_HOME/hyperion.config.json
+else
+ if [ ! -f $ADDON_HOME/hyperion.config.json.sample ] ; then
+ cp $ADDON_DIR/config/hyperion.config.json.sample $ADDON_HOME
+ fi
+ echo "please create $ADDON_HOME/hyperion.config.json"
+fi
diff --git a/packages/addons/service/hyperion/source/system.d/service.hyperion.service b/packages/addons/service/hyperion/source/system.d/service.hyperion.service
index df7fea7..350cb61 100644
--- a/packages/addons/service/hyperion/source/system.d/service.hyperion.service
+++ b/packages/addons/service/hyperion/source/system.d/service.hyperion.service
@@ -1,12 +1,11 @@
[Unit]
Description=Hyperion Systemd service
After=graphical.target
-ConditionPathExists=/storage/.kodi/userdata/addon_data/service.hyperion/hyperion.config.json
[Service]
ExecStart=/bin/sh -c "exec sh /storage/.kodi/addons/service.hyperion/bin/hyperiond.start"
TimeoutStopSec=2
-Restart=always
+Restart=on-failure
RestartSec=10
StartLimitInterval=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment