#!/bin/bash # Oneliner to find script's directory. Please note - last path component should NOT be symlink. SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus # DBUS_SESSION_BUS_PID=`cat /run/dbus/pid` export DBUS_SESSION_BUS_ADDRESS # export DBUS_SESSION_BUS_PID # To avoid problems with pulseaudio pkill pulseaudio # Ensure BT stack is here python3 -u $SCRIPT_DIR/src/bt_preconnect.py $SCRIPT_DIR/config/agent.yaml #!/bin/bash if [ -n "$1" ] then # Run main script python3 -u $SCRIPT_DIR/src/agent_gsm.py --config $SCRIPT_DIR/config/agent.yaml "$1" else python3 -u $SCRIPT_DIR/src/agent_gsm.py --config $SCRIPT_DIR/config/agent.yaml fi