aboutsummaryrefslogtreecommitdiffstats
path: root/community/mycroft-gui/0001-start-stop-commands-from-environment.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/mycroft-gui/0001-start-stop-commands-from-environment.patch')
-rw-r--r--community/mycroft-gui/0001-start-stop-commands-from-environment.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/community/mycroft-gui/0001-start-stop-commands-from-environment.patch b/community/mycroft-gui/0001-start-stop-commands-from-environment.patch
new file mode 100644
index 0000000000..90008a018a
--- /dev/null
+++ b/community/mycroft-gui/0001-start-stop-commands-from-environment.patch
@@ -0,0 +1,45 @@
+From f2525cf9c53d0077631136d8cef4f1f88e283149 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=85ke=20Forslund?= <ake.forslund@gmail.com>
+Date: Tue, 14 Jul 2020 07:52:02 +0000
+Subject: [PATCH] Start / stop commands from environment
+
+- MYCROFT_START_CMD will be used to start the mycroft services if defined
+- MYCROFT_STOP_CMD will be used to stop the mycroft services if defined
+---
+ data/mycroft-gui-core-loader.in | 12 ++++++++++--
+ data/mycroft-gui-core-stop.in | 9 +++++++--
+ 2 files changed, 17 insertions(+), 4 deletions(-)
+
+diff --git a/data/mycroft-gui-core-loader.in b/data/mycroft-gui-core-loader.in
+index 9b3fca4..c65de79 100644
+--- a/data/mycroft-gui-core-loader.in
++++ b/data/mycroft-gui-core-loader.in
+@@ -1,3 +1,11 @@
+ #!/bin/sh
+-cd ${MYCROFT_CORE_DIR}
+-./start-mycroft.sh all
++
++#If startup command is defined use it
++if ! test -z "$MYCROFT_START_CMD"; then
++ $MYCROFT_START_CMD
++else
++ # Use default git install location
++ cd ${MYCROFT_CORE_DIR}
++ ./start-mycroft.sh all
++fi
++
+diff --git a/data/mycroft-gui-core-stop.in b/data/mycroft-gui-core-stop.in
+index ec5fd2b..65a5cef 100644
+--- a/data/mycroft-gui-core-stop.in
++++ b/data/mycroft-gui-core-stop.in
+@@ -1,3 +1,8 @@
+ #!/bin/sh
+-cd ${MYCROFT_CORE_DIR}
+-./stop-mycroft.sh
++#If stop command is defined use it
++if ! test -z "$MYCROFT_STOP_CMD"; then
++ $MYCROFT_STOP_CMD
++else
++ # Use default git install
++ cd ${MYCROFT_CORE_DIR}
++ ./stop-mycroft.sh