#!/usr/bin/env ash # # Copyright (C) 2022 Ing # # This is free software, licensed under the MIT License. # See /LICENSE for more information. # if [ "${1}" = "late" ]; then echo "Installing addon mountloader - ${1}" mkdir -p "/tmpRoot/usr/arc/addons/" cp -vf "${0}" "/tmpRoot/usr/arc/addons/" cp -vf /usr/bin/yq /tmpRoot/usr/bin/yq cp -vf /usr/bin/cpio /tmpRoot/usr/bin/cpio cp -vf /usr/bin/unzip /tmpRoot/usr/bin/unzip cp -vf /usr/bin/arc-update.sh /tmpRoot/usr/bin/arc-update.sh cp -vf /usr/bin/arc-loaderdisk.sh /tmpRoot/usr/bin/arc-loaderdisk.sh rm -f /tmpRoot/usr/arc/.mountloader if [ ! -f /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db ]; then echo "copy esynoscheduler.db" mkdir -p /tmpRoot/usr/syno/etc/esynoscheduler cp -vf /addons/esynoscheduler.db /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db fi echo "insert mountloader task to esynoscheduler.db" export LD_LIBRARY_PATH=/tmpRoot/bin:/tmpRoot/lib /tmpRoot/bin/sqlite3 /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db <