tree: cleanup

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-08-31 13:55:49 -04:00
parent 6dce716f00
commit 18e068ede8
2 changed files with 32 additions and 33 deletions

View File

@ -35,7 +35,6 @@ EOF
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
ln -vsf /usr/lib/systemd/system/allowdowngrade.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/allowdowngrade.service ln -vsf /usr/lib/systemd/system/allowdowngrade.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/allowdowngrade.service
fi
elif [ "${1}" = "uninstall" ]; then elif [ "${1}" = "uninstall" ]; then
echo "Installing addon allowdowngrade - ${1}" echo "Installing addon allowdowngrade - ${1}"
# To-Do # To-Do

View File

@ -27,40 +27,40 @@ if [ "${1}" = "late" ]; then
INPUTPATH="/usr/arc/addons" INPUTPATH="/usr/arc/addons"
ADDONSPATH="/tmpRoot/usr/arc/addons" ADDONSPATH="/tmpRoot/usr/arc/addons"
if [ -d "${SSPATH}" ]; then if [ -d "${SSPATH}" ]; then
# Define the hosts entries to be added # Define the hosts entries to be added
ENTRIES=("0.0.0.0 synosurveillance.synology.com") ENTRIES=("0.0.0.0 synosurveillance.synology.com")
for ENTRY in "${ENTRIES[@]}" for ENTRY in "${ENTRIES[@]}"
do do
if [ -f /tmpRoot/etc/hosts ]; then if [ -f /tmpRoot/etc/hosts ]; then
# Check if the entry is already in the file # Check if the entry is already in the file
if grep -Fxq "${ENTRY}" /tmpRoot/etc/hosts; then if grep -Fxq "${ENTRY}" /tmpRoot/etc/hosts; then
echo "Entry ${ENTRY} already exists" echo "Entry ${ENTRY} already exists"
else else
echo "Entry ${ENTRY} does not exist, adding now" echo "Entry ${ENTRY} does not exist, adding now"
echo "${ENTRY}" >> /tmpRoot/etc/hosts echo "${ENTRY}" >> /tmpRoot/etc/hosts
fi
fi fi
if [ -f /tmpRoot/etc.defaults/hosts ]; then
if grep -Fxq "${ENTRY}" /tmpRoot/etc.defaults/hosts; then
echo "Entry ${ENTRY} already exists"
else
echo "Entry ${ENTRY} does not exist, adding now"
echo "${ENTRY}" >> /tmpRoot/etc.defaults/hosts
fi
fi
done
# Check Sha256sum for Patch
if [ "$(sha256sum ${SSPATH}/lib/libssutils.so | cut -d' ' -f1)" = "b0fafefe820aa8ecd577313dff2ae22cf41a6ddf44051f01670c3b92ee04224d" ]; then
tar -zxf "${INPUTPATH}/sspatch.tgz" -C "${ADDONSPATH}/"
copy_file ${SSPATH}/lib libssutils.so ${ADDONSPATH}/ 0644
copy_file ${SSPATH}/sbin sscmshostd ${ADDONSPATH}/ 0755
copy_file ${SSPATH}/sbin sscored ${ADDONSPATH}/ 0755
copy_file ${SSPATH}/sbin ssdaemonmonitord ${ADDONSPATH}/ 0755
copy_file ${SSPATH}/sbin ssexechelperd ${ADDONSPATH}/ 0755
copy_file ${SSPATH}/sbin ssroutined ${ADDONSPATH}/ 0755
copy_file ${SSPATH}/sbin ssrtmpclientd ${ADDONSPATH}/ 0755
fi fi
if [ -f /tmpRoot/etc.defaults/hosts ]; then
if grep -Fxq "${ENTRY}" /tmpRoot/etc.defaults/hosts; then
echo "Entry ${ENTRY} already exists"
else
echo "Entry ${ENTRY} does not exist, adding now"
echo "${ENTRY}" >> /tmpRoot/etc.defaults/hosts
fi
fi
done
# Check Sha256sum for Patch
if [ "$(sha256sum ${SSPATH}/lib/libssutils.so | cut -d' ' -f1)" = "b0fafefe820aa8ecd577313dff2ae22cf41a6ddf44051f01670c3b92ee04224d" ]; then
tar -zxf "${INPUTPATH}/sspatch.tgz" -C "${ADDONSPATH}/"
copy_file ${SSPATH}/lib libssutils.so ${ADDONSPATH}/ 0644
copy_file ${SSPATH}/sbin sscmshostd ${ADDONSPATH}/ 0755
copy_file ${SSPATH}/sbin sscored ${ADDONSPATH}/ 0755
copy_file ${SSPATH}/sbin ssdaemonmonitord ${ADDONSPATH}/ 0755
copy_file ${SSPATH}/sbin ssexechelperd ${ADDONSPATH}/ 0755
copy_file ${SSPATH}/sbin ssroutined ${ADDONSPATH}/ 0755
copy_file ${SSPATH}/sbin ssrtmpclientd ${ADDONSPATH}/ 0755
fi
fi fi
elif [ "${1}" = "uninstall" ]; then elif [ "${1}" = "uninstall" ]; then
echo "Installing addon sspatch - ${1}" echo "Installing addon sspatch - ${1}"