amepatch/cpufreqscaling/sspatch: try as oneshot

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-10-05 23:11:18 +02:00
parent 87056c133d
commit 4c963c878d
5 changed files with 5 additions and 31 deletions

View File

@ -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

View File

@ -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]

View File

@ -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}

View File

@ -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

View File

@ -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]