Loading sync.sh +6 −6 Original line number Diff line number Diff line Loading @@ -16,15 +16,15 @@ if [ -n "$OPENWRT_GIT_URL" ]; then git config user.name "${OPENWRT_GIT_NAME:-OpenWRT Git bot}" || die "Couldn't set name" while true; do git reset --hard || die "Couldn't reset repo" git pull || die "Couldn't pull repo" git reset --hard > /dev/null || die "Couldn't reset repo" git pull > /dev/null || die "Couldn't pull repo" LC_ALL=C.UTF-8 rsync -vax --delete-after --exclude '*-opkg' -e "ssh -p ${OPENWRT_SSH_PORT:-22}" "${OPENWRT_SSH_HOST:-root@192.168.0.1}:/overlay/upper/" overlay/ || die "Couldn't rsync config" git add -A || die "Couldn't add files" LC_ALL=C.UTF-8 rsync -qax --delete-after --exclude '*-opkg' -e "ssh -p ${OPENWRT_SSH_PORT:-22}" "${OPENWRT_SSH_HOST:-root@192.168.0.1}:/overlay/upper/" overlay/ || die "Couldn't rsync config" git add -A > /dev/null || die "Couldn't add files" if [ -n "$(git status -su)" ]; then git commit -m OpenWRT 2> /dev/null || die "Couldn't commit changes" git push --force origin HEAD:${OPENWRT_GIT_BRANCH:-remote} 2> /dev/null || die "Couldn't push changes" git commit -m OpenWRT > /dev/null || die "Couldn't commit changes" git push --force origin HEAD:${OPENWRT_GIT_BRANCH:-remote} || die "Couldn't push changes" fi sleep ${OPENWRT_SYNC_INTERVAL:-10} || die "Couldn't sleep correctly" Loading Loading
sync.sh +6 −6 Original line number Diff line number Diff line Loading @@ -16,15 +16,15 @@ if [ -n "$OPENWRT_GIT_URL" ]; then git config user.name "${OPENWRT_GIT_NAME:-OpenWRT Git bot}" || die "Couldn't set name" while true; do git reset --hard || die "Couldn't reset repo" git pull || die "Couldn't pull repo" git reset --hard > /dev/null || die "Couldn't reset repo" git pull > /dev/null || die "Couldn't pull repo" LC_ALL=C.UTF-8 rsync -vax --delete-after --exclude '*-opkg' -e "ssh -p ${OPENWRT_SSH_PORT:-22}" "${OPENWRT_SSH_HOST:-root@192.168.0.1}:/overlay/upper/" overlay/ || die "Couldn't rsync config" git add -A || die "Couldn't add files" LC_ALL=C.UTF-8 rsync -qax --delete-after --exclude '*-opkg' -e "ssh -p ${OPENWRT_SSH_PORT:-22}" "${OPENWRT_SSH_HOST:-root@192.168.0.1}:/overlay/upper/" overlay/ || die "Couldn't rsync config" git add -A > /dev/null || die "Couldn't add files" if [ -n "$(git status -su)" ]; then git commit -m OpenWRT 2> /dev/null || die "Couldn't commit changes" git push --force origin HEAD:${OPENWRT_GIT_BRANCH:-remote} 2> /dev/null || die "Couldn't push changes" git commit -m OpenWRT > /dev/null || die "Couldn't commit changes" git push --force origin HEAD:${OPENWRT_GIT_BRANCH:-remote} || die "Couldn't push changes" fi sleep ${OPENWRT_SYNC_INTERVAL:-10} || die "Couldn't sleep correctly" Loading