diff --git a/amepatch/all/usr/bin/amepatch.sh b/amepatch/all/usr/bin/amepatch.sh index b3afeed..59ee43b 100755 --- a/amepatch/all/usr/bin/amepatch.sh +++ b/amepatch/all/usr/bin/amepatch.sh @@ -18,19 +18,6 @@ if [ -d "/var/packages/CodecPack" ]; then so_backup="$ame_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" - lic_patched="/usr/arc/ame_license.patched" - - if [ -f "$lic_patched" ]; 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!" - rm -f "$lic_patched" - exit 1 - fi - fi if [ ! -f "$so_backup" ]; then cp -p "$so" "$so_backup" @@ -73,11 +60,9 @@ if [ -d "/var/packages/CodecPack" ]; then echo -e "AME Patch: Downloading Codec!" 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 @@ -87,12 +72,10 @@ if [ -d "/var/packages/CodecPack" ]; then if [ -f "$lic_backup" ]; then mv -f "$lic_backup" "$lic" fi - rm -f "$lic_patched" echo -e "AME Patch: Backup restored!" exit 1 fi else echo -e "AME Patch: CodecPack not found!" - rm -f "$lic_patched" exit 1 fi \ No newline at end of file diff --git a/amepatch/install.sh b/amepatch/install.sh index ebe38d1..6ff8618 100755 --- a/amepatch/install.sh +++ b/amepatch/install.sh @@ -22,9 +22,8 @@ After=smpkg-custom-install.service [Service] User=root -Type=simple -Restart=on-failure -RestartSec=5 +Type=oneshot +RemainAfterExit=yes ExecStart=/usr/bin/amepatch.sh [Install] diff --git a/cpufreqscaling/install.sh b/cpufreqscaling/install.sh index bf94c55..9e48c87 100755 --- a/cpufreqscaling/install.sh +++ b/cpufreqscaling/install.sh @@ -24,6 +24,7 @@ Wants=smpkg-custom-install.service After=smpkg-custom-install.service [Service] +User=root Type=oneshot RemainAfterExit=yes ExecStart=/usr/sbin/scaling.sh ${2} diff --git a/sspatch/all/usr/bin/sspatch.sh b/sspatch/all/usr/bin/sspatch.sh index f59bb7c..57adc07 100755 --- a/sspatch/all/usr/bin/sspatch.sh +++ b/sspatch/all/usr/bin/sspatch.sh @@ -58,11 +58,6 @@ if [ -d "${SSPATH}" ]; then fi done - if [ -f "${ss_lic_patched}" ]; then - echo "sspatch: SurveillanceStation already patched" - exit 0 - fi - /usr/syno/bin/synopkg stop SurveillanceStation sleep 5 @@ -96,13 +91,10 @@ if [ -d "${SSPATH}" ]; then copy_file ${SSPATH}/sbin ssroutined ${PATCHPATH} 0755 copy_file ${SSPATH}/sbin ssmessaged ${PATCHPATH} 0755 copy_file ${SSPATH}/sbin ssrtmpclientd ${PATCHPATH} 0755 - echo "true" >"${ss_lic_patched}" fi sleep 5 /usr/syno/bin/synopkg restart SurveillanceStation -else - rm -f "${ss_lic_patched}" fi exit 0 \ No newline at end of file diff --git a/sspatch/install.sh b/sspatch/install.sh index f30339a..7fb610a 100755 --- a/sspatch/install.sh +++ b/sspatch/install.sh @@ -25,9 +25,8 @@ After=multi-user.target [Service] User=root -Type=simple -Restart=on-failure -RestartSec=5 +Type=oneshot +RemainAfterExit=yes ExecStart=/usr/bin/sspatch.sh [Install]