From 347e4c4231fab28bf477a35f183be0410350dc87 Mon Sep 17 00:00:00 2001 From: AuxXxilium Date: Sun, 20 Oct 2024 02:05:46 +0200 Subject: [PATCH] test Signed-off-by: AuxXxilium --- amepatch/all/usr/bin/amepatch.sh | 16 +++++++--------- amepatch/install.sh | 5 +++-- sspatch/install.sh | 1 - 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/amepatch/all/usr/bin/amepatch.sh b/amepatch/all/usr/bin/amepatch.sh index 3883609..1c96bf5 100755 --- a/amepatch/all/usr/bin/amepatch.sh +++ b/amepatch/all/usr/bin/amepatch.sh @@ -10,9 +10,9 @@ if [ -d "/var/packages/CodecPack" ]; then # disable apparmor check for AME [ -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 mv -f "${apparmor}" "${apparmor}.bak" + /usr/syno/etc/rc.sysv/apparmor.sh remove_packages_profile 0 CodecPack fi values=('669066909066906690' 'B801000000' '30') @@ -23,8 +23,6 @@ if [ -d "/var/packages/CodecPack" ]; then so_backup="$cp_usr_path/lib/libsynoame-license.so.orig" lic="/usr/syno/etc/license/data/ame/offline_license.json" 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 cp -p "$so" "$so_backup" @@ -32,9 +30,6 @@ if [ -d "/var/packages/CodecPack" ]; then if [ ! -f "$lic_backup" ]; then cp -p "$lic" "$lic_backup" fi - if [ ! -f "$licsig_backup" ]; then - cp -p "$licsig" "$licsig_backup" - fi 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"}]' else 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 fi @@ -76,9 +77,6 @@ if [ -d "/var/packages/CodecPack" ]; then if [ -f "$lic_backup" ]; then mv -f "$lic_backup" "$lic" fi - if [ -f "$licsig_backup" ]; then - mv -f "$licsig_backup" "$licsig" - fi echo -e "AME Patch: Unsuccessful!" exit 1 fi diff --git a/amepatch/install.sh b/amepatch/install.sh index 2ca5dbe..2eef883 100755 --- a/amepatch/install.sh +++ b/amepatch/install.sh @@ -20,8 +20,9 @@ Description=addon amepatch After=multi-user.target [Service] -Type=oneshot -RemainAfterExit=yes +Type=simple +Restart=on-failure +RestartSec=10 ExecStart=/usr/bin/amepatch.sh [Install] diff --git a/sspatch/install.sh b/sspatch/install.sh index 7fb610a..4739f58 100755 --- a/sspatch/install.sh +++ b/sspatch/install.sh @@ -24,7 +24,6 @@ Description=addon sspatch After=multi-user.target [Service] -User=root Type=oneshot RemainAfterExit=yes ExecStart=/usr/bin/sspatch.sh