#!/usr/bin/env ash # # Copyright (C) 2023 AuxXxilium and Ing # # This is free software, licensed under the MIT License. # See /LICENSE for more information. # if [ "${1}" = "late" ]; then echo "Installing addon rebootto... - ${1}" mkdir -p "/tmpRoot/usr/arc/addons/" cp -pf "${0}" "/tmpRoot/usr/arc/addons/" cp -pf /usr/bin/loader-reboot.sh /tmpRoot/usr/bin cp -pf /usr/bin/grub-editenv /tmpRoot/usr/bin if [ ! -f /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db ]; then echo "copy esynoscheduler.db" mkdir -p /tmpRoot/usr/syno/etc/esynoscheduler cp -pf /addons/esynoscheduler.db /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db fi echo "insert rebootto... task to esynoscheduler.db" export LD_LIBRARY_PATH=/tmpRoot/bin:/tmpRoot/lib /tmpRoot/bin/sqlite3 /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db <