wget --inet4-only --no-check-certificate https://download.mikrotik.com/routeros/7.2.1/chr-7.2.1.img.zip -O chr.img.zip  && \
gunzip -c chr.img.zip > chr.img  && \
mount -o loop,offset=33571840 chr.img /mnt && \
ADDRESS=`ip addr show ens3 | grep global | cut -d' ' -f 6 | head -n 1` && \
GATEWAY=`ip route list | grep default | cut -d' ' -f 3 | head -n 1` && \
echo "/ip address add address=$ADDRESS interface=[/interface ethernet find where name=ether1]
/ip route add gateway=$GATEWAY
/ip dhcp-client disable number=0
/ip service disable telnet,ftp,ssh,api,api-ssl
/ip dns set servers=8.8.8.8,1.1.1.1
 " > /mnt/rw/autorun.scr && \
umount /mnt && \
echo 1 > /proc/sys/kernel/sysrq && \
echo u > /proc/sysrq-trigger && \
dd if=chr.img bs=1024 of=/dev/vda oflag=sync
