#!/bin/sh
if [[ -f /mnt/onboard/.adds/rmkit/enable_remux ]]; then
  echo "ENABLING REMUX" > /tmp/rmkit.log
  sh /opt/bin/remux.sh &
else
  echo "NOT ENABLING REMUX" > /tmp/rmkit.log
fi

if [[ -f /usr/bin/usbnet-toggle ]]; then
  echo "#!/bin/sh" > /opt/bin/apps/usbnet.sh
  echo "/usr/bin/usbnet-toggle" >> /opt/bin/apps/usbnet.sh
  echo "echo back > /run/remux.api" >> /opt/bin/apps/usbnet.sh
fi
