Command scripting on vyos 1.2.8

Hi Team,

Since my vyos is a prod one I am unable to simulate the issue hence wrote a script but unable to test. This is the reason wanted to know from community whether this would work? Or do I need any further finetuning or modifications?

DATE=`date +%Y%m%d-%H%M%S`
source /opt/vyatta/etc/functions/script-template
run show ip bgp | grep 65515 > /dev/null
echo $?
        if [ $? -eq 1 ];then
        restart vpn
echo "VPN Tunnel Restarted at $DATE" >> $LOGFILE
run show ip bgp >> >> $LOGFILE
echo "======================" >> $LOGFILE

I guess this is not accepting those “>>” prompts. Any idea how do I execute this script?