Skip to content

Instantly share code, notes, and snippets.

@PeterJohnson
Created March 27, 2023 03:52
Show Gist options
  • Save PeterJohnson/2702b331ee3c236188ec76ecf499c333 to your computer and use it in GitHub Desktop.
Save PeterJohnson/2702b331ee3c236188ec76ecf499c333 to your computer and use it in GitHub Desktop.
lvrt shell script
#!/bin/sh
exec 2>&1 >/dev/null
while true; do
APP_PATH=`nirtcfg --file /etc/natinst/share/lvrt.conf --get section=LVRT,token=RTTarget.ApplicationPath`
if [ "$APP_PATH" = /home/lvuser/natinst/bin/TBLStartupApp.rtexe ]
then
APP_BOOT=`nirtcfg --file /etc/natinst/share/lvrt.conf --get section=LVRT,token=RTTarget.LaunchAppAtBoot,value=true | tr "[:upper:]" "[:lower:]"`
APP_DISABLED=`nirtcfg --get section=SYSTEMSETTINGS,token=NoApp.enabled,value=false | tr "[:upper:]" "[:lower:]"`
if [ "$APP_BOOT" = true ] && [ "$APP_DISABLED" = false ]
then
/usr/local/frc/bin/frcRunRobot.sh
fi
else
exec -a lvrt ./ni-lvrt
fi
sleep 1
done
@PeterJohnson
Copy link
Author

Move /usr/local/natinst/labview/lvrt to ni-lvrt.
Install script as lvrt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment