You have no commands after if (only comments). You need to use character : on one line in this case like
Code
if /usr/bin/systemctl list-jobs | /bin/egrep -q 'reboot.target.*start' > /dev/null; then
: # must use this line
# reboot
# wget -q 'http://192.168.1.203/MainZone/index.put.asp?cmd0=PutZone_OnOff%2FOFF';
else
# shutdown
wget -q 'http://192.168.1.42/cgi-bin/system_mgr.cgi?cmd=cgi_shutdown' ;
wget -q 'http://192.168.1.203/MainZone/index.put.asp?cmd0=PutZone_OnOff%2FOFF';
fi

