#!/usr/bin/env ash # # Copyright (C) 2023 AuxXxilium and Ing # # This is free software, licensed under the MIT License. # See /LICENSE for more information. # # External incoming required ${MLINK} and ${MCHECKSUM} if [ -z "${MLINK}" -o -z "${MCHECKSUM}" ]; then echo "MLINK or MCHECKSUM is null" return fi if [ "${1}" = "modules" ]; then echo "Installing addon localrss - ${1}" # MajorVersion=`/bin/get_key_value /etc.defaults/VERSION majorversion` # MinorVersion=`/bin/get_key_value /etc.defaults/VERSION minorversion` . /etc.defaults/VERSION cat >/usr/syno/web/localrss.json </usr/syno/web/localrss.xml < RSS for DSM Auto Update http://update.synology.com/autoupdate/genRSS.php Wed May 1 12:02:35 CST 2024 Copyright 2024 Synology Inc DSM ${productversion}-${buildnumber} ${major} ${minor} ${buildphase} ${buildnumber} ${builddate} ${major} 0 0 0 ${builddate} ${unique} ${MLINK} ${MCHECKSUM} EOF if [ -f /usr/syno/web/localrss.xml ]; then # cat /usr/syno/web/localrss.xml sed -i "s|rss_server=.*$|rss_server=\"http://localhost:5000/localrss.xml\"|g" "/etc/synoinfo.conf" "/etc.defaults/synoinfo.conf" sed -i "s|rss_server_ssl=.*$|rss_server_ssl=\"http://localhost:5000/localrss.xml\"|g" "/etc/synoinfo.conf" "/etc.defaults/synoinfo.conf" fi if [ -f /usr/syno/web/localrss.json ]; then # cat /usr/syno/web/localrss.json sed -i "s|rss_server_v2=.*$|rss_server_v2=\"http://localhost:5000/localrss.json\"|g" "/etc/synoinfo.conf" "/etc.defaults/synoinfo.conf" fi grep "rss_server" "/etc.defaults/synoinfo.conf" fi