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" lic_patched="/usr/arc/ame_license.patched"
if [ -f "$lic_patched" ]; then 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 -e "AME Patch: Already patched! -> Codec downloaded!"
echo "true" >"$lic_patched"
exit 0 exit 0
else else
echo -e "AME Patch: Already patched! -> Codec download failed!" 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 if "$ame_path/bin/synoame-bin-check-license"; then
echo -e "AME Patch: Downloading Codec!" echo -e "AME Patch: Downloading Codec!"
echo "true" >"${lic_patched}"
if "$ame_path/bin/synoame-bin-auto-install-needed-codec"; then if "$ame_path/bin/synoame-bin-auto-install-needed-codec"; then
echo -e "AME Patch: Successful!" echo -e "AME Patch: Successful!"
echo "true" >"$lic_patched"
exit 0 exit 0
else else
echo -e "AME Patch: Failed!" echo -e "AME Patch: Failed!"
rm -f "$lic_patched"
exit 1 exit 1
fi fi
else else

View File

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

View File

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

View File

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