#!/bin/sh set -x if [ $(grep -c "rootfs.*[[:space:]]rw[[:space:],]" /proc/mounts) = '0' ]; then mntroot rw fi mkdir -p /opt/kindling curl SUB_BASE_URL/kindling/v0.1/refresh-image.sh -o /opt/kindling/refresh-image.sh rm -f /opt/kindling/refresh-image.sh ln -s /opt/kindling/refresh-image.sh /usr/bin/ sed '/refresh-image.sh/d' -i '' /etc/crontab/root echo '* * * * * refresh-image.sh SUB_BASE_URL SUB_ROUTE' >> /etc/crontab/root