From f2525cf9c53d0077631136d8cef4f1f88e283149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85ke=20Forslund?= 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