Skip to content

Commit a6d9c87

Browse files
authored
Disable code reboot while killing robot process (#778)
1 parent 34d3675 commit a6d9c87

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/main/resources/frcKillRobot.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,23 @@ fi
3333

3434
printf "%s - Killing robot code in frcKillRobot.sh\n" "`date`" | FRC_ConsoleTee
3535

36+
nirtcfg --file /etc/natinst/share/lvrt.conf --set section=LVRT,token=RTTarget.LaunchAppAtBoot,value=False
37+
3638
if [ -e $FRC_PID_FILE ]; then
3739
DAEMON_PID=`cat $FRC_PID_FILE`
3840
if [ -e /proc/$DAEMON_PID ]; then
3941
PGROUP=`ps -o pid,pgid,comm | grep $DAEMON_PID | awk -v N=2 '{print $N}'`
4042
kill -term -- -$PGROUP
4143
sleep 1
4244
kill -9 -- -$PGROUP
45+
sleep 1
4346
fi
4447
rm -f $FRC_PID_FILE
4548
fi
4649

4750
if [ "$RESTART" = yes ]; then
4851
RT_STARTUP_DISABLED=`nirtcfg --get section=SYSTEMSETTINGS,token=NoApp.enabled,value=false | tr "[:upper:]" "[:lower:]"`
52+
nirtcfg --file /etc/natinst/share/lvrt.conf --set section=LVRT,token=RTTarget.LaunchAppAtBoot,value=True
4953
if [ "$RT_STARTUP_DISABLED" = false ]; then
5054
killall lvrt
5155
else

0 commit comments

Comments
 (0)