<commit_before>#!/usr/bin/env bash
export NVM_DIR="${HOME}/.nvm"
[ -s "$NVM_DIR/nvm.sh"  ] && . "$NVM_DIR/nvm.sh"  # This loads nvm

# USB Relay Controller
if [ $(jq '.useUSBrelay' ${HOME}/.arlobot/personalDataForBehavior.json) == true ]
    then
    echo "Turning off all relays"
    ${HOME}/catkin_ws/src/ArloBot/scripts/switch_relay_name.sh all off
fi

# Master Power Relay
if [ $(jq '.useMasterPowerRelay' ${HOME}/.arlobot/personalDataForBehavior.json) == true  ]
then
    echo "Turning off Arlo Power."
    ${HOME}/catkin_ws/src/ArloBot/scripts/switch_master_relay.sh off
    # It takes a while before it works after boot up.
    while [ $? -gt 0 ]
    do
        sleep 1
        ${HOME}/catkin_ws/src/ArloBot/scripts/switch_master_relay.sh off
    done
    # The first one always results in some odd output and a failure, so do it one more time.
    sleep 1
    ${HOME}/catkin_ws/src/ArloBot/scripts/switch_master_relay.sh off
fi

cd ${HOME}/catkin_ws/src/ArloBot/node/
if [ $(jq '.useMyCroft' ${HOME}/.arlobot/personalDataForBehavior.json) == true ]
    then
    ${HOME}/.nvm/versions/node/$(nvm current)/bin/pm2 start ${HOME}/catkin_ws/src/ArloBot/node/pm2Config.json
    else
    ${HOME}/.nvm/versions/node/$(nvm current)/bin/pm2 start ${HOME}/catkin_ws/src/ArloBot/node/pm2Config.json --only Robot
fi<commit_msg>Fix startup file to accomadate new Mycroft startup method.<commit_after>#!/usr/bin/env bash
export NVM_DIR="${HOME}/.nvm"
[ -s "$NVM_DIR/nvm.sh"  ] && . "$NVM_DIR/nvm.sh"  # This loads nvm

# USB Relay Controller
if [ $(jq '.useUSBrelay' ${HOME}/.arlobot/personalDataForBehavior.json) == true ]
    then
    echo "Turning off all relays"
    ${HOME}/catkin_ws/src/ArloBot/scripts/switch_relay_name.sh all off
fi

# Master Power Relay
if [ $(jq '.useMasterPowerRelay' ${HOME}/.arlobot/personalDataForBehavior.json) == true  ]
then
    echo "Turning off Arlo Power."
    ${HOME}/catkin_ws/src/ArloBot/scripts/switch_master_relay.sh off
    # It takes a while before it works after boot up.
    while [ $? -gt 0 ]
    do
        sleep 1
        ${HOME}/catkin_ws/src/ArloBot/scripts/switch_master_relay.sh off
    done
    # The first one always results in some odd output and a failure, so do it one more time.
    sleep 1
    ${HOME}/catkin_ws/src/ArloBot/scripts/switch_master_relay.sh off
fi

if [ $(jq '.useMyCroft' ${HOME}/.arlobot/personalDataForBehavior.json) == true ]
    then
    cd ${HOME}/catkin_ws/src/ArloBot/mycroft-core
    ./start-mycroft.sh all
fi

cd ${HOME}/catkin_ws/src/ArloBot/node/
${HOME}/.nvm/versions/node/$(nvm current)/bin/pm2 start ${HOME}/catkin_ws/src/ArloBot/node/pm2Config.json
{'fraction_non_alphanumeric': 0.1410110224249335, 'fraction_numerical': 0.004561003420752566, 'mean_word_length': 3.4161073825503356, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6362041', 'n_tokens_mistral': 989, 'n_tokens_neox': 967, 'n_words': 216}