amepatch: rework

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-10-05 19:34:45 +02:00
parent 5e3c120eac
commit 87056c133d
4 changed files with 7 additions and 5 deletions

View File

@ -21,8 +21,9 @@ if [ -d "/var/packages/CodecPack" ]; then
lic_patched="/usr/arc/ame_license.patched"
if [ -f "$lic_patched" ]; then
if "$ame_path/bin/synoame-bin-auto-install-needed-codec"; then
if "$ame_path/bin/synoame-bin-check-license" && "$ame_path/bin/synoame-bin-auto-install-needed-codec"; then
echo -e "AME Patch: Already patched! -> Codec downloaded!"
echo "true" >"$lic_patched"
exit 0
else
echo -e "AME Patch: Already patched! -> Codec download failed!"
@ -70,12 +71,13 @@ if [ -d "/var/packages/CodecPack" ]; then
if "$ame_path/bin/synoame-bin-check-license"; then
echo -e "AME Patch: Downloading Codec!"
echo "true" >"${lic_patched}"
if "$ame_path/bin/synoame-bin-auto-install-needed-codec"; then
echo -e "AME Patch: Successful!"
echo "true" >"$lic_patched"
exit 0
else
echo -e "AME Patch: Failed!"
rm -f "$lic_patched"
exit 1
fi
else

View File

@ -17,7 +17,8 @@ if [ "${1}" = "late" ]; then
cat <<EOF >${DEST}
[Unit]
Description=addon amepatch
After=multi-user.target
Wants=smpkg-custom-install.service
After=smpkg-custom-install.service
[Service]
User=root

View File

@ -100,7 +100,7 @@ if [ -d "${SSPATH}" ]; then
fi
sleep 5
/usr/syno/bin/synopkg start SurveillanceStation
/usr/syno/bin/synopkg restart SurveillanceStation
else
rm -f "${ss_lic_patched}"
fi

View File

@ -22,7 +22,6 @@ if [ "${1}" = "late" ]; then
[Unit]
Description=addon sspatch
After=multi-user.target
After=amepatch.service
[Service]
User=root