From 684230213edf31fb5ff4682e5df69568b640c091 Mon Sep 17 00:00:00 2001 From: Steve Penrod Date: Wed, 15 Aug 2018 03:50:37 -0500 Subject: [PATCH 1/2] Set the directory explicitly start-mycroft.sh scripts Explicitly setting the directory at the beginning of the start-mycroft.sh and stop-mycroft.sh scripts. The behaves better if invoked from a different directory. --- start-mycroft.sh | 3 ++- stop-mycroft.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/start-mycroft.sh b/start-mycroft.sh index 9378150e38..e2d0a2fd04 100755 --- a/start-mycroft.sh +++ b/start-mycroft.sh @@ -18,7 +18,8 @@ SOURCE="${BASH_SOURCE[0]}" script=${0} script=${script##*/} -DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" +cd -P "$( dirname "$SOURCE" )" +DIR="$( pwd )" VIRTUALENV_ROOT=${VIRTUALENV_ROOT:-"${DIR}/.venv"} function help() { diff --git a/stop-mycroft.sh b/stop-mycroft.sh index 74f8c4bd7c..26c6d3cafe 100755 --- a/stop-mycroft.sh +++ b/stop-mycroft.sh @@ -18,7 +18,8 @@ SOURCE="${BASH_SOURCE[0]}" script=${0} script=${script##*/} -DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" +cd -P "$( dirname "$SOURCE" )" +DIR="$( pwd )" function help() { echo "${script}: Mycroft service stopper" From 5b8a0187669976629e308ca4d7d26a3c944e5257 Mon Sep 17 00:00:00 2001 From: Steve Penrod Date: Wed, 15 Aug 2018 17:19:30 -0500 Subject: [PATCH 2/2] Remove unused DIR variable --- stop-mycroft.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/stop-mycroft.sh b/stop-mycroft.sh index 26c6d3cafe..9e0d667be6 100755 --- a/stop-mycroft.sh +++ b/stop-mycroft.sh @@ -19,7 +19,6 @@ SOURCE="${BASH_SOURCE[0]}" script=${0} script=${script##*/} cd -P "$( dirname "$SOURCE" )" -DIR="$( pwd )" function help() { echo "${script}: Mycroft service stopper"