blob: d4281c566e7751c7d10ae79614dbd458ea5c93e5 [file] [log] [blame]
#!/bin/bash
set -x
if [[ "$(hostname)" == "roboRIO"* ]]; then
/usr/local/natinst/etc/init.d/systemWebServer stop
ROBOT_CODE="/home/admin/bin"
cd "${ROBOT_CODE}"
ln -s /var/local/natinst/log/FRC_UserProgram.log /tmp/FRC_UserProgram.log
ln -s /var/local/natinst/log/FRC_UserProgram.log "${ROBOT_CODE}/FRC_UserProgram.log"
elif [[ "$(hostname)" == "pi-"* ]]; then
# We have systemd configured to handle restarting, so just exec.
export PATH="${PATH}:/home/pi/bin"
rm -rf /dev/shm/aos
exec starterd --user=pi
else
ROBOT_CODE="${HOME}/bin"
fi
cd "${ROBOT_CODE}"
export PATH="${PATH}:${ROBOT_CODE}"
while true; do
rm -rf /dev/shm/aos
starterd 2>&1
done