Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-10-20 02:05:46 +02:00
parent 4b010771e0
commit 347e4c4231
3 changed files with 10 additions and 12 deletions

View File

@ -10,9 +10,9 @@ if [ -d "/var/packages/CodecPack" ]; then
# disable apparmor check for AME # disable apparmor check for AME
[ -d "/var/packages/CodecPack/target/apparmor" ] && apparmor="/var/packages/CodecPack/target/apparmor" [ -d "/var/packages/CodecPack/target/apparmor" ] && apparmor="/var/packages/CodecPack/target/apparmor"
/usr/syno/etc/rc.sysv/apparmor.sh remove_packages_profile 0 CodecPack
if [ -e "${apparmor}" ]; then if [ -e "${apparmor}" ]; then
mv -f "${apparmor}" "${apparmor}.bak" mv -f "${apparmor}" "${apparmor}.bak"
/usr/syno/etc/rc.sysv/apparmor.sh remove_packages_profile 0 CodecPack
fi fi
values=('669066909066906690' 'B801000000' '30') values=('669066909066906690' 'B801000000' '30')
@ -23,8 +23,6 @@ if [ -d "/var/packages/CodecPack" ]; then
so_backup="$cp_usr_path/lib/libsynoame-license.so.orig" so_backup="$cp_usr_path/lib/libsynoame-license.so.orig"
lic="/usr/syno/etc/license/data/ame/offline_license.json" lic="/usr/syno/etc/license/data/ame/offline_license.json"
lic_backup="/usr/syno/etc/license/data/ame/offline_license.json.orig" lic_backup="/usr/syno/etc/license/data/ame/offline_license.json.orig"
licsig="/usr/syno/etc/license/data/ame/offline_license.sig"
licsig_backup="/usr/syno/etc/license/data/ame/offline_license.sig.orig"
if [ ! -f "$so_backup" ]; then if [ ! -f "$so_backup" ]; then
cp -p "$so" "$so_backup" cp -p "$so" "$so_backup"
@ -32,9 +30,6 @@ if [ -d "/var/packages/CodecPack" ]; then
if [ ! -f "$lic_backup" ]; then if [ ! -f "$lic_backup" ]; then
cp -p "$lic" "$lic_backup" cp -p "$lic" "$lic_backup"
fi fi
if [ ! -f "$licsig_backup" ]; then
cp -p "$licsig" "$licsig_backup"
fi
hash_to_check="$(md5sum -b "$so" | awk '{print $1}')" hash_to_check="$(md5sum -b "$so" | awk '{print $1}')"
@ -49,6 +44,12 @@ if [ -d "/var/packages/CodecPack" ]; then
content='[{"attribute": {"codec": "hevc", "type": "free"}, "status": "valid", "extension_gid": null, "expireTime": 0, "appName": "ame", "follow": ["device"], "duration": 1576800000, "appType": 14, "licenseContent": 1, "registered_at": 1649315995, "server_time": 1685421618, "firstActTime": 1649315995, "licenseCode": "0"}, {"attribute": {"codec": "aac", "type": "free"}, "status": "valid", "extension_gid": null, "expireTime": 0, "appName": "ame", "follow": ["device"], "duration": 1576800000, "appType": 14, "licenseContent": 1, "registered_at": 1649315995, "server_time": 1685421618, "firstActTime": 1649315995, "licenseCode": "0"}]' content='[{"attribute": {"codec": "hevc", "type": "free"}, "status": "valid", "extension_gid": null, "expireTime": 0, "appName": "ame", "follow": ["device"], "duration": 1576800000, "appType": 14, "licenseContent": 1, "registered_at": 1649315995, "server_time": 1685421618, "firstActTime": 1649315995, "licenseCode": "0"}, {"attribute": {"codec": "aac", "type": "free"}, "status": "valid", "extension_gid": null, "expireTime": 0, "appName": "ame", "follow": ["device"], "duration": 1576800000, "appType": 14, "licenseContent": 1, "registered_at": 1649315995, "server_time": 1685421618, "firstActTime": 1649315995, "licenseCode": "0"}]'
else else
echo "MD5 mismatch" echo "MD5 mismatch"
if [ -f "$so_backup" ]; then
mv -f "$so_backup" "$so"
fi
if [ -f "$lic_backup" ]; then
mv -f "$lic_backup" "$lic"
fi
exit 1 exit 1
fi fi
@ -76,9 +77,6 @@ if [ -d "/var/packages/CodecPack" ]; then
if [ -f "$lic_backup" ]; then if [ -f "$lic_backup" ]; then
mv -f "$lic_backup" "$lic" mv -f "$lic_backup" "$lic"
fi fi
if [ -f "$licsig_backup" ]; then
mv -f "$licsig_backup" "$licsig"
fi
echo -e "AME Patch: Unsuccessful!" echo -e "AME Patch: Unsuccessful!"
exit 1 exit 1
fi fi

View File

@ -20,8 +20,9 @@ Description=addon amepatch
After=multi-user.target After=multi-user.target
[Service] [Service]
Type=oneshot Type=simple
RemainAfterExit=yes Restart=on-failure
RestartSec=10
ExecStart=/usr/bin/amepatch.sh ExecStart=/usr/bin/amepatch.sh
[Install] [Install]

View File

@ -24,7 +24,6 @@ Description=addon sspatch
After=multi-user.target After=multi-user.target
[Service] [Service]
User=root
Type=oneshot Type=oneshot
RemainAfterExit=yes RemainAfterExit=yes
ExecStart=/usr/bin/sspatch.sh ExecStart=/usr/bin/sspatch.sh