mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
tree: rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
c41978c5d0
commit
3364944d77
@ -36,9 +36,6 @@ if [ "${1}" = "late" ]; then
|
||||
# echo "ExecStartPre=/usr/sbin/modprobe button" >>${DEST}
|
||||
# echo "ExecStart=/usr/sbin/acpid" >>${DEST}
|
||||
# echo "ExecStopPost=/usr/sbin/modprobe -r button" >>${DEST}
|
||||
# echo >>${DEST}
|
||||
# echo "[X-Synology]" >>${DEST}
|
||||
# echo "Author=Virtualization Team" >>${DEST}
|
||||
#
|
||||
# mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
# ln -vsf /usr/lib/systemd/system/acpid.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/acpid.service
|
||||
|
@ -15,7 +15,7 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/allowdowngrade.service"
|
||||
cat << EOF > ${DEST}
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=addon allowdowngrade
|
||||
After=multi-user.target
|
||||
@ -28,9 +28,6 @@ ExecStart=/usr/bin/allowdowngrade.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[X-Synology]
|
||||
Author=Virtualization Team
|
||||
EOF
|
||||
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
|
@ -14,7 +14,7 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/amepatch.service"
|
||||
cat > ${DEST} <<EOF
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=addon amepatch
|
||||
DefaultDependencies=no
|
||||
@ -31,9 +31,6 @@ ExecStart=/usr/bin/amepatch.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[X-Synology]
|
||||
Author=Virtualization Team
|
||||
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
|
||||
|
@ -16,7 +16,7 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/arcdns.service"
|
||||
cat << EOF > ${DEST}
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=addon arcdns
|
||||
After=multi-user.target
|
||||
@ -29,9 +29,6 @@ ExecStart=/usr/bin/arcdns.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[X-Synology]
|
||||
Author=Virtualization Team
|
||||
EOF
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/arcdns.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/arcdns.service
|
||||
|
@ -15,7 +15,7 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/codecpatch.service"
|
||||
cat << EOF > ${DEST}
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=addon codecpatch
|
||||
After=multi-user.target
|
||||
@ -27,9 +27,6 @@ ExecStart=/usr/bin/codecpatch.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[X-Synology]
|
||||
Author=Virtualization Team
|
||||
EOF
|
||||
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
|
@ -65,17 +65,19 @@ elif [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/keymap.service"
|
||||
echo "[Unit]" >${DEST}
|
||||
echo "Description=Configure keymap" >>${DEST}
|
||||
echo "After=getty.target" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Service]" >>${DEST}
|
||||
echo "Type=oneshot" >>${DEST}
|
||||
echo "RemainAfterExit=yes" >>${DEST}
|
||||
echo "ExecStart=/usr/bin/loadkeys /usr/share/keymaps/i386/${LAYOUT:-qwerty}/${KEYMAP:-us}.map.gz" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Install]" >>${DEST}
|
||||
echo "WantedBy=multi-user.target" >>${DEST}
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Configure keymap
|
||||
After=getty.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/loadkeys /usr/share/keymaps/i386/${LAYOUT:-qwerty}/${KEYMAP:-us}.map.gz
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/keymap.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/keymap.service
|
||||
|
@ -17,7 +17,7 @@ if [ "${1}" = "late" ]; then
|
||||
[ "${2}" != "schedutil" ] && cp -vf /usr/lib/modules/cpufreq_${2}.ko /tmpRoot/usr/lib/modules/cpufreq_${2}.ko && modprobe cpufreq_${2} || true
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/cpufreqscaling.service"
|
||||
cat << EOF > ${DEST}
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Enable CPU Freq scaling
|
||||
DefaultDependencies=no
|
||||
@ -30,13 +30,10 @@ User=root
|
||||
Type=simple
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
ExecStart=/usr/sbin/scaling.sh "${2}"
|
||||
ExecStart=/usr/sbin/scaling.sh ${2}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[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
|
||||
|
@ -16,7 +16,7 @@ if [ "${1}" = "late" ]; then
|
||||
shift
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/cpuinfo.service"
|
||||
cat << EOF > ${DEST}
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Adds correct CPU Info
|
||||
After=multi-user.target
|
||||
@ -28,9 +28,6 @@ ExecStart=/usr/bin/cpuinfo.sh $@
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[X-Synology]
|
||||
Author=Virtualization Team
|
||||
EOF
|
||||
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
|
@ -15,7 +15,7 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/deduplication.service"
|
||||
cat > ${DEST} <<EOF
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Enable Deduplication
|
||||
After=multi-user.target
|
||||
|
@ -92,7 +92,7 @@ elif [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/udevrules.service"
|
||||
cat << EOF > ${DEST}
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Reload udev rules
|
||||
|
||||
@ -104,9 +104,6 @@ ExecStart=/usr/bin/udevadm control --reload-rules
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[X-Synology]
|
||||
Author=Virtualization Team
|
||||
EOF
|
||||
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
|
@ -15,17 +15,19 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/expands.service"
|
||||
echo "[Unit]" >${DEST}
|
||||
echo "Description=Expanded miscellaneous" >>${DEST}
|
||||
echo "After=multi-user.target" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Service]" >>${DEST}
|
||||
echo "Type=oneshot" >>${DEST}
|
||||
echo "RemainAfterExit=yes" >>${DEST}
|
||||
echo "ExecStart=/usr/bin/expands.sh" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Install]" >>${DEST}
|
||||
echo "WantedBy=multi-user.target" >>${DEST}
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Expanded miscellaneous
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/expands.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/expands.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/expands.service
|
||||
|
@ -15,7 +15,7 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/hdddb.service"
|
||||
cat > ${DEST} <<EOF
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=HDDs/SSDs drives databases
|
||||
After=multi-user.target
|
||||
|
@ -31,7 +31,7 @@ if [ "${1}" = "late" ]; then
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
# All on
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/ledcontrol.service"
|
||||
cat << EOF > ${DEST}
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Adds uGreen LED control
|
||||
After=multi-user.target
|
||||
@ -43,9 +43,6 @@ ExecStart=/usr/bin/ledcontrol.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[X-Synology]
|
||||
Author=Virtualization Team
|
||||
EOF
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/ledcontrol.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/ledcontrol.service
|
||||
|
@ -288,6 +288,6 @@ elif [ "${1}" = "late" ]; then
|
||||
fi
|
||||
|
||||
# Copy Loader Reboot
|
||||
cp -vf /usr/bin/loader-reboot.sh /tmpRoot/usr/bin
|
||||
cp -vf /usr/bin/grub-editenv /tmpRoot/usr/bin
|
||||
cp -vf /usr/bin/loader-reboot.sh /tmpRoot/usr/bin/loader-reboot.sh
|
||||
cp -vf /usr/bin/grub-editenv /tmpRoot/usr/bin/grub-editenv
|
||||
fi
|
||||
|
@ -1,20 +1,30 @@
|
||||
#!/usr/bin/env ash
|
||||
#
|
||||
# Copyright (C) 2023 AuxXxilium <https://github.com/AuxXxilium>
|
||||
#
|
||||
# This is free software, licensed under the MIT License.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
if [ "${1}" = "late" ]; then
|
||||
echo "Creating service to exec Multi-SMB3"
|
||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||
cp -vf /usr/bin/smb3-multi.sh /tmpRoot/usr/bin/smb3-multi.sh
|
||||
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/smb3-multi.service"
|
||||
echo "[Unit]" >${DEST}
|
||||
echo "Description=Enable Multi-SMB3" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Service]" >>${DEST}
|
||||
echo "Type=oneshot" >>${DEST}
|
||||
echo "RemainAfterExit=yes" >>${DEST}
|
||||
echo "ExecStart=/usr/bin/smb3-multi.sh" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Install]" >>${DEST}
|
||||
echo "WantedBy=multi-user.target" >>${DEST}
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Enable Multi-SMB3
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/smb3-multi.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
mkdir -vp /tmpRoot/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/smb3-multi.service /tmpRoot/lib/systemd/system/multi-user.target.wants/smb3-multi.service
|
||||
|
@ -10,22 +10,23 @@ if [ "${1}" = "late" ]; then
|
||||
echo "Installing addon notify - ${1}"
|
||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||
|
||||
cp -vf /usr/bin/notify.sh /tmpRoot/usr/bin/notify.sh
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/notify.service"
|
||||
echo "[Unit]" >${DEST}
|
||||
echo "Description=arc notify" >>${DEST}
|
||||
echo "After=multi-user.target" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Service]" >>${DEST}
|
||||
echo "Type=oneshot" >>${DEST}
|
||||
echo "RemainAfterExit=yes" >>${DEST}
|
||||
echo "ExecStart=/usr/bin/notify.sh" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Install]" >>${DEST}
|
||||
echo "WantedBy=multi-user.target" >>${DEST}
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=arc notify
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/notify.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/notify.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/notify.service
|
||||
|
@ -50,24 +50,25 @@ elif [ "${1}" = "late" ]; then
|
||||
|
||||
# Create storage pool page without RAID type.
|
||||
cp -vf /usr/bin/nvmesystem.sh /tmpRoot/usr/bin/nvmesystem.sh
|
||||
|
||||
[ ! -f "/tmpRoot/usr/bin/gzip" ] && cp -vf /usr/bin/gzip /tmpRoot/usr/bin/gzip
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/nvmesystem.service"
|
||||
echo "[Unit]" >${DEST}
|
||||
echo "Description=Modify storage panel" >>${DEST}
|
||||
echo "After=multi-user.target" >>${DEST}
|
||||
echo "After=synoscgi.service" >>${DEST}
|
||||
echo "After=storagepanel.service" >>${DEST} # storagepanel
|
||||
echo >>${DEST}
|
||||
echo "[Service]" >>${DEST}
|
||||
echo "Type=oneshot" >>${DEST}
|
||||
echo "RemainAfterExit=yes" >>${DEST}
|
||||
echo "ExecStart=/usr/bin/nvmesystem.sh" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Install]" >>${DEST}
|
||||
echo "WantedBy=multi-user.target" >>${DEST}
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Modify storage panel
|
||||
After=multi-user.target
|
||||
After=synoscgi.service
|
||||
After=storagepanel.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/nvmesystem.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/nvmesystem.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/nvmesystem.service
|
||||
|
@ -16,17 +16,20 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/photosfacepatch.service"
|
||||
echo "[Unit]" >${DEST}
|
||||
echo "Description=Enable face recognition in Synology Photos" >>${DEST}
|
||||
echo "After=multi-user.target" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Service]" >>${DEST}
|
||||
echo "Type=oneshot" >>${DEST}
|
||||
echo "RemainAfterExit=yes" >>${DEST}
|
||||
echo "ExecStart=/usr/bin/photosfacepatch.sh" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Install]" >>${DEST}
|
||||
echo "WantedBy=multi-user.target" >>${DEST}
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Enable face recognition in Synology Photos
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/photosfacepatch.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/photosfacepatch.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/photosfacepatch.service
|
||||
|
@ -24,17 +24,19 @@ if [ "${1}" = "late" ]; then
|
||||
if [ ! "$(cat "/tmpRoot/usr/arc/revert.sh")" = '#!/usr/bin/env bash' ]; then
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/revert.service"
|
||||
echo "[Unit]" >${DEST}
|
||||
echo "Description=revert" >>${DEST}
|
||||
echo "After=multi-user.target" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Service]" >>${DEST}
|
||||
echo "Type=oneshot" >>${DEST}
|
||||
echo "RemainAfterExit=yes" >>${DEST}
|
||||
echo "ExecStart=/usr/arc/revert.sh" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Install]" >>${DEST}
|
||||
echo "WantedBy=multi-user.target" >>${DEST}
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=revert
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/arc/revert.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/revert.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/revert.service
|
||||
|
@ -23,18 +23,20 @@ elif [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/rndis.service"
|
||||
echo "[Unit]" > ${DEST}
|
||||
echo "Description=Android USB Network Adapter" >>${DEST}
|
||||
echo "After=multi-user.target" >>${DEST}
|
||||
echo "ConditionPathExists=/sys/class/net/usb0" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Service]" >>${DEST}
|
||||
echo "Type=simple" >>${DEST}
|
||||
echo "Restart=always" >>${DEST}
|
||||
echo "ExecStart=/usr/bin/rndis.sh" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Install]" >>${DEST}
|
||||
echo "WantedBy=multi-user.target" >>${DEST}
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Android USB Network Adapter
|
||||
After=multi-user.target
|
||||
ConditionPathExists=/sys/class/net/usb0
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
ExecStart=/usr/bin/rndis.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/rndis.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/rndis.service
|
||||
|
@ -1,6 +1,14 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env ash
|
||||
#
|
||||
# Copyright (C) 2023 AuxXxilium <https://github.com/AuxXxilium>
|
||||
#
|
||||
# This is free software, licensed under the MIT License.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
if [ "${1}" = "late" ]; then
|
||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||
echo "sanmanager-repair late"
|
||||
cp -vf sanrepair.sh /tmpRoot/usr/sbin/sanrepair.sh
|
||||
chmod 755 /tmpRoot/usr/sbin/sanrepair.sh
|
||||
|
@ -15,17 +15,19 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/sequentialio.service"
|
||||
echo "[Unit]" >${DEST}
|
||||
echo "Description=Sequential I/O SSD caches" >>${DEST}
|
||||
echo "After=multi-user.target" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Service]" >>${DEST}
|
||||
echo "Type=oneshot" >>${DEST}
|
||||
echo "RemainAfterExit=yes" >>${DEST}
|
||||
echo "ExecStart=/usr/bin/sequentialio.sh $@" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Install]" >>${DEST}
|
||||
echo "WantedBy=multi-user.target" >>${DEST}
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Sequential I/O SSD caches
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/sequentialio.sh $@
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/sequentialio.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/sequentialio.service
|
||||
|
@ -18,7 +18,7 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/sspatch.service"
|
||||
cat > ${DEST} <<EOF
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=addon sspatch
|
||||
After=multi-user.target
|
||||
|
@ -17,7 +17,7 @@ if [ "${1}" = "late" ]; then
|
||||
shift
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/storagepanel.service"
|
||||
cat << EOF > ${DEST}
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Modify storage panel
|
||||
DefaultDependencies=no
|
||||
@ -32,9 +32,6 @@ ExecStart=/usr/bin/storagepanel.sh $@
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[X-Synology]
|
||||
Author=Virtualization Team
|
||||
EOF
|
||||
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
|
@ -16,17 +16,19 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/arc-updatenotify.service"
|
||||
echo "[Unit]" >${DEST}
|
||||
echo "Description=addon arc-updatenotify" >>${DEST}
|
||||
echo "After=multi-user.target" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Service]" >>${DEST}
|
||||
echo "Type=oneshot" >>${DEST}
|
||||
echo "RemainAfterExit=yes" >>${DEST}
|
||||
echo "ExecStart=/usr/bin/arc-updatenotify.sh create" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Install]" >>${DEST}
|
||||
echo "WantedBy=multi-user.target" >>${DEST}
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=addon arc-updatenotify
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/arc-updatenotify.sh create
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/arc-updatenotify.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/arc-updatenotify.service
|
||||
|
@ -15,7 +15,7 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/videostation.service"
|
||||
cat > ${DEST} <<EOF
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=VideoStation for DSM
|
||||
After=multi-user.target
|
||||
|
@ -21,11 +21,9 @@ elif [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/wol.service"
|
||||
cat <<EOF > ${DEST}
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Force WOL on ethN
|
||||
DefaultDependencies=no
|
||||
IgnoreOnIsolate=true
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
@ -36,9 +34,6 @@ ExecStart=/usr/bin/wol.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[X-Synology]
|
||||
Author=Virtualization Team
|
||||
EOF
|
||||
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
|
Loading…
Reference in New Issue
Block a user