YUN sketch won't run/restart following power down or reset

Yun CPU AR9331's GPIO 18 connect with MCU ATmega32u4's reset pin.

nano /usr/bin/reset-mcu
#!/bin/sh

echo 18 > /sys/class/gpio/export
echo "high" > /sys/class/gpio/gpio18/direction
echo 1 > /sys/class/gpio/gpio18/value
echo 0 > /sys/class/gpio/gpio18/value
echo 18 > /sys/class/gpio/unexport

In order to reset ATmega32u4 , edit file /etc/rc.local and insert /usr/bin/reset-mcu into it to make sure every CPU reboot the MCU got reset as well.

nano /etc/rc.local
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

wifi-live-or-reset
boot-complete-notify
/usr/bin/reset-mcu

exit 0