diff --git a/scripts/prepare-msm.sh b/scripts/prepare-msm.sh index b55fc91e59..7ba2559941 100755 --- a/scripts/prepare-msm.sh +++ b/scripts/prepare-msm.sh @@ -18,7 +18,16 @@ mycroft_root_dir='/opt/mycroft' skills_dir="${mycroft_root_dir}"/skills # exit on any error set -Ee -chmod +x msm/msm + +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ]; do + DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + SOURCE="$(readlink "$SOURCE")" + [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" +done +DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + +chmod +x ${DIR}/../msm/msm # Determine which user is running this script setup_user=$USER diff --git a/start-mycroft.sh b/start-mycroft.sh index 0d8d8239ed..5968033fc4 100755 --- a/start-mycroft.sh +++ b/start-mycroft.sh @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +SOURCE="${BASH_SOURCE[0]}" + script=${0} script=${script##*/} DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" diff --git a/stop-mycroft.sh b/stop-mycroft.sh index 9345d011dc..72c4ffe190 100755 --- a/stop-mycroft.sh +++ b/stop-mycroft.sh @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +SOURCE="${BASH_SOURCE[0]}" + script=${0} script=${script##*/} DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"