From 3364944d77c6b04532682309898c29553883fa38 Mon Sep 17 00:00:00 2001 From: AuxXxilium Date: Thu, 19 Sep 2024 17:26:10 +0200 Subject: [PATCH] tree: rework Signed-off-by: AuxXxilium --- acpid/install.sh | 3 --- allowdowngrade/install.sh | 5 +---- amepatch/install.sh | 5 +---- arcdns/install.sh | 5 +---- codecpatch/install.sh | 5 +---- console/install.sh | 24 +++++++++++++----------- cpufreqscaling/install.sh | 7 ++----- cpuinfo/install.sh | 5 +---- deduplication/install.sh | 2 +- eudev/install.sh | 5 +---- expands/install.sh | 24 +++++++++++++----------- hdddb/install.sh | 2 +- ledcontrol/install.sh | 5 +---- misc/install.sh | 4 ++-- multismb3/install.sh | 30 ++++++++++++++++++++---------- notify/install.sh | 25 +++++++++++++------------ nvmesystem/install.sh | 29 +++++++++++++++-------------- photosfacepatch/install.sh | 25 ++++++++++++++----------- revert/install.sh | 24 +++++++++++++----------- rndis/install.sh | 26 ++++++++++++++------------ sanmanager-repair/install.sh | 10 +++++++++- sequentialio/install.sh | 24 +++++++++++++----------- sspatch/install.sh | 2 +- storagepanel/install.sh | 5 +---- updatenotify/install.sh | 24 +++++++++++++----------- videostation/install.sh | 2 +- wol/install.sh | 7 +------ 27 files changed, 167 insertions(+), 167 deletions(-) diff --git a/acpid/install.sh b/acpid/install.sh index 717e2fb..31a4916 100755 --- a/acpid/install.sh +++ b/acpid/install.sh @@ -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 diff --git a/allowdowngrade/install.sh b/allowdowngrade/install.sh index fc68cbd..321acdb 100755 --- a/allowdowngrade/install.sh +++ b/allowdowngrade/install.sh @@ -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 <${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 diff --git a/amepatch/install.sh b/amepatch/install.sh index 07072de..411ecd7 100755 --- a/amepatch/install.sh +++ b/amepatch/install.sh @@ -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} <${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 diff --git a/arcdns/install.sh b/arcdns/install.sh index fc4d849..6601ffc 100755 --- a/arcdns/install.sh +++ b/arcdns/install.sh @@ -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 <${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 diff --git a/codecpatch/install.sh b/codecpatch/install.sh index ab8fa31..74925db 100755 --- a/codecpatch/install.sh +++ b/codecpatch/install.sh @@ -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 <${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 diff --git a/console/install.sh b/console/install.sh index 4cd334d..2be29cb 100755 --- a/console/install.sh +++ b/console/install.sh @@ -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 <${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 diff --git a/cpufreqscaling/install.sh b/cpufreqscaling/install.sh index d11b429..81da22b 100755 --- a/cpufreqscaling/install.sh +++ b/cpufreqscaling/install.sh @@ -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 <${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 diff --git a/cpuinfo/install.sh b/cpuinfo/install.sh index 72f24f4..c7f6258 100755 --- a/cpuinfo/install.sh +++ b/cpuinfo/install.sh @@ -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 <${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 diff --git a/deduplication/install.sh b/deduplication/install.sh index 8ff0043..d21be1b 100755 --- a/deduplication/install.sh +++ b/deduplication/install.sh @@ -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} <${DEST} [Unit] Description=Enable Deduplication After=multi-user.target diff --git a/eudev/install.sh b/eudev/install.sh index 5271704..8e6c9c8 100755 --- a/eudev/install.sh +++ b/eudev/install.sh @@ -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 <${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 diff --git a/expands/install.sh b/expands/install.sh index 6647e33..9d83fef 100755 --- a/expands/install.sh +++ b/expands/install.sh @@ -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 <${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 diff --git a/hdddb/install.sh b/hdddb/install.sh index 49dfbb9..8a4e3f5 100755 --- a/hdddb/install.sh +++ b/hdddb/install.sh @@ -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} <${DEST} [Unit] Description=HDDs/SSDs drives databases After=multi-user.target diff --git a/ledcontrol/install.sh b/ledcontrol/install.sh index 8ec05b8..9c1a2d7 100755 --- a/ledcontrol/install.sh +++ b/ledcontrol/install.sh @@ -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 <${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 diff --git a/misc/install.sh b/misc/install.sh index 6b5eb73..4074905 100755 --- a/misc/install.sh +++ b/misc/install.sh @@ -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 diff --git a/multismb3/install.sh b/multismb3/install.sh index a446c6d..0ad591f 100755 --- a/multismb3/install.sh +++ b/multismb3/install.sh @@ -1,20 +1,30 @@ #!/usr/bin/env ash +# +# Copyright (C) 2023 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 <${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 diff --git a/notify/install.sh b/notify/install.sh index 68b1852..5e0a0cc 100755 --- a/notify/install.sh +++ b/notify/install.sh @@ -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 <${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 diff --git a/nvmesystem/install.sh b/nvmesystem/install.sh index 0859aa5..da88067 100755 --- a/nvmesystem/install.sh +++ b/nvmesystem/install.sh @@ -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 <${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 diff --git a/photosfacepatch/install.sh b/photosfacepatch/install.sh index a6009b1..9362256 100755 --- a/photosfacepatch/install.sh +++ b/photosfacepatch/install.sh @@ -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 <${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 diff --git a/revert/install.sh b/revert/install.sh index 5fad1d2..510a1c5 100755 --- a/revert/install.sh +++ b/revert/install.sh @@ -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 <${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 diff --git a/rndis/install.sh b/rndis/install.sh index cec525f..29bd4e1 100755 --- a/rndis/install.sh +++ b/rndis/install.sh @@ -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 <${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 diff --git a/sanmanager-repair/install.sh b/sanmanager-repair/install.sh index baae2b3..41de478 100755 --- a/sanmanager-repair/install.sh +++ b/sanmanager-repair/install.sh @@ -1,6 +1,14 @@ -#!/bin/bash +#!/usr/bin/env ash +# +# Copyright (C) 2023 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 diff --git a/sequentialio/install.sh b/sequentialio/install.sh index e5c6ad5..4ef2f5c 100755 --- a/sequentialio/install.sh +++ b/sequentialio/install.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 <${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 diff --git a/sspatch/install.sh b/sspatch/install.sh index 6158c95..1dd4555 100755 --- a/sspatch/install.sh +++ b/sspatch/install.sh @@ -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} <${DEST} [Unit] Description=addon sspatch After=multi-user.target diff --git a/storagepanel/install.sh b/storagepanel/install.sh index b4339dd..075a6e3 100755 --- a/storagepanel/install.sh +++ b/storagepanel/install.sh @@ -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 <${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 diff --git a/updatenotify/install.sh b/updatenotify/install.sh index b969c1b..b407abc 100755 --- a/updatenotify/install.sh +++ b/updatenotify/install.sh @@ -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 <${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 diff --git a/videostation/install.sh b/videostation/install.sh index 581c23f..8925c41 100755 --- a/videostation/install.sh +++ b/videostation/install.sh @@ -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} <${DEST} [Unit] Description=VideoStation for DSM After=multi-user.target diff --git a/wol/install.sh b/wol/install.sh index 59e9b41..9eeb2d8 100755 --- a/wol/install.sh +++ b/wol/install.sh @@ -21,11 +21,9 @@ elif [ "${1}" = "late" ]; then mkdir -p "/tmpRoot/usr/lib/systemd/system" DEST="/tmpRoot/usr/lib/systemd/system/wol.service" - cat < ${DEST} + cat <${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