mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
sspatch: last fixes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
4c29b743bc
commit
6a5031aae1
@ -21,30 +21,34 @@ function copy_file() {
|
|||||||
SSPATH="/var/packages/SurveillanceStation/target"
|
SSPATH="/var/packages/SurveillanceStation/target"
|
||||||
PATCHPATH="/usr/arc"
|
PATCHPATH="/usr/arc"
|
||||||
if [ -d "${SSPATH}" ]; then
|
if [ -d "${SSPATH}" ]; then
|
||||||
|
echo "sspatch: SurveillanceStation found"
|
||||||
|
|
||||||
# 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 "/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}" /etc/hosts; then
|
||||||
echo "sspatch: Entry ${ENTRY} already exists"
|
echo "sspatch: Entry ${ENTRY} already exists"
|
||||||
else
|
else
|
||||||
echo "sspatch: Entry ${ENTRY} does not exist, adding now"
|
echo "sspatch: Entry ${ENTRY} does not exist, adding now"
|
||||||
echo "${ENTRY}" >> /tmpRoot/etc/hosts
|
echo "${ENTRY}" >> /etc/hosts
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -f "/tmpRoot/etc.defaults/hosts" ]; then
|
if [ -f "/etc.defaults/hosts" ]; then
|
||||||
if grep -Fxq "${ENTRY}" /tmpRoot/etc.defaults/hosts; then
|
if grep -Fxq "${ENTRY}" /etc.defaults/hosts; then
|
||||||
echo "sspatch: Entry ${ENTRY} already exists"
|
echo "sspatch: Entry ${ENTRY} already exists"
|
||||||
else
|
else
|
||||||
echo "sspatch: Entry ${ENTRY} does not exist, adding now"
|
echo "sspatch: Entry ${ENTRY} does not exist, adding now"
|
||||||
echo "${ENTRY}" >> /tmpRoot/etc.defaults/hosts
|
echo "${ENTRY}" >> /etc.defaults/hosts
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "sspatch: SurveillanceStation found"
|
/usr/syno/bin/synopkg stop SurveillanceStation
|
||||||
|
sleep 5
|
||||||
|
|
||||||
# Check Sha256sum for Patch
|
# Check Sha256sum for Patch
|
||||||
[ -f "${SSPATH}/lib/libssutils.org.so" ] && CHECKSUM="$(sha256sum ${SSPATH}/lib/libssutils.org.so | cut -d' ' -f1)" || CHECKSUM="$(sha256sum ${SSPATH}/lib/libssutils.so | cut -d' ' -f1)"
|
[ -f "${SSPATH}/lib/libssutils.org.so" ] && CHECKSUM="$(sha256sum ${SSPATH}/lib/libssutils.org.so | cut -d' ' -f1)" || CHECKSUM="$(sha256sum ${SSPATH}/lib/libssutils.so | cut -d' ' -f1)"
|
||||||
if [ "${CHECKSUM}" == "b0fafefe820aa8ecd577313dff2ae22cf41a6ddf44051f01670c3b92ee04224d" ]; then
|
if [ "${CHECKSUM}" == "b0fafefe820aa8ecd577313dff2ae22cf41a6ddf44051f01670c3b92ee04224d" ]; then
|
||||||
@ -70,6 +74,9 @@ if [ -d "${SSPATH}" ]; then
|
|||||||
else
|
else
|
||||||
echo "sspatch: SurveillanceStation Version not supported"
|
echo "sspatch: SurveillanceStation Version not supported"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
sleep 5
|
||||||
|
/usr/syno/bin/synopkg start SurveillanceStation
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
Loading…
Reference in New Issue
Block a user