mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
tree: rewrite more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
b2f70cede4
commit
0fa75cbf3c
@ -12,7 +12,7 @@ if [ "${1}" = "late" ]; then
|
||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||
cp -vf /usr/bin/amepatch.sh /tmpRoot/usr/bin/amepatch.sh
|
||||
|
||||
cat > ${DEST} <<'EOF'
|
||||
cat > ${DEST} <<EOF
|
||||
[Unit]
|
||||
Description=addon amepatch
|
||||
After=multi-user.target
|
||||
@ -29,7 +29,6 @@ ExecStartPost=/usr/syno/bin/systemctl stop amepatch
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/amepatch.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/amepatch.service
|
||||
fi
|
||||
|
@ -19,41 +19,43 @@ if [ "${1}" = "late" ]; then
|
||||
if [ "${2}" = "userspace" ]; then
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/cpufreqscaling.service"
|
||||
echo "[Unit]" >${DEST}
|
||||
echo "Description=Enable CPU Freq scaling" >>${DEST}
|
||||
echo "DefaultDependencies=no" >>${DEST}
|
||||
echo "IgnoreOnIsolate=true" >>${DEST}
|
||||
echo "After=multi-user.target" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Service]" >>${DEST}
|
||||
echo "User=root" >>${DEST}
|
||||
echo "Restart=always" >>${DEST}
|
||||
echo "RestartSec=30" >>${DEST}
|
||||
echo "ExecStart=/bin/ash /usr/sbin/scaler.sh" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[X-Synology]" >>${DEST}
|
||||
echo "Author=Virtualization Team" >>${DEST}
|
||||
cat > ${DEST} <<EOF
|
||||
[Unit]
|
||||
Description=Enable CPU Freq scaling
|
||||
DefaultDependencies=no
|
||||
IgnoreOnIsolate=true
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
ExecStart=/bin/ash /usr/sbin/scaler.sh
|
||||
|
||||
[X-Synology]
|
||||
Author=Virtualization Team
|
||||
EOF
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/cpufreqscaling.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/cpufreqscaling.service
|
||||
else
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/cpufreqscaling.service"
|
||||
echo "[Unit]" >${DEST}
|
||||
echo "Description=Enable CPU Freq scaling" >>${DEST}
|
||||
echo "DefaultDependencies=no" >>${DEST}
|
||||
echo "IgnoreOnIsolate=true" >>${DEST}
|
||||
echo "After=multi-user.target" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Service]" >>${DEST}
|
||||
echo "User=root" >>${DEST}
|
||||
echo "Type=oneshot" >>${DEST}
|
||||
echo "RemainAfterExit=yes" >>${DEST}
|
||||
echo "ExecStart=/bin/ash /usr/sbin/rescaler.sh ${2}" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[X-Synology]" >>${DEST}
|
||||
echo "Author=Virtualization Team" >>${DEST}
|
||||
cat > ${DEST} <<EOF
|
||||
[Unit]
|
||||
Description=Enable CPU Freq scaling
|
||||
DefaultDependencies=no
|
||||
IgnoreOnIsolate=true
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/bin/ash /usr/sbin/rescaler.sh ${2}
|
||||
|
||||
[X-Synology]
|
||||
Author=Virtualization Team
|
||||
EOF
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/cpufreqscaling.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/cpufreqscaling.service
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user