diff --git a/selfdrive/modeld/dmonitoringmodeld b/selfdrive/modeld/dmonitoringmodeld index f292fe4c0b..fc007470b2 100755 --- a/selfdrive/modeld/dmonitoringmodeld +++ b/selfdrive/modeld/dmonitoringmodeld @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" cd $DIR diff --git a/selfdrive/modeld/modeld b/selfdrive/modeld/modeld index 7c1025a72f..14048ec9fd 100755 --- a/selfdrive/modeld/modeld +++ b/selfdrive/modeld/modeld @@ -1,7 +1,10 @@ -#!/bin/sh +#!/usr/bin/env bash DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" cd "$DIR/../../" -export LD_PRELOAD="$DIR/libthneed.so" +if [ -f "$DIR/libthneed.so" ]; then + export LD_PRELOAD="$DIR/libthneed.so" +fi + exec "$DIR/modeld.py" diff --git a/selfdrive/modeld/navmodeld b/selfdrive/modeld/navmodeld index 079afd9677..58215c2e9d 100755 --- a/selfdrive/modeld/navmodeld +++ b/selfdrive/modeld/navmodeld @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" cd $DIR