From 90aea333fdf6ac77a87eb2d9e1ae36fd26fb09fc Mon Sep 17 00:00:00 2001 From: gitea Date: Fri, 8 Sep 2023 16:52:07 +0800 Subject: [PATCH] [modify] add reboot function and initialization on startup --- update/init.sh | 5 +++-- update/sysmngt.sh | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/update/init.sh b/update/init.sh index 968671e..9f842ec 100644 --- a/update/init.sh +++ b/update/init.sh @@ -2,8 +2,9 @@ #============================================================================== /usr/bin/qbittorrent-nox --webui-port=10005 -d -/usr/bin/bash /opt/scripts/update/calibre.sh +# /usr/bin/bash /opt/scripts/update/calibre.sh mv /opt/wd/99-Temp/shutdown /opt/wd/99-Temp/shutdown.old +mv /opt/wd/99-Temp/reboot /opt/wd/99-Temp/reboot.old #============================================================================== ip link set enp1s0 promisc on ip link set enp2s0 promisc on @@ -12,7 +13,7 @@ ip link set wlx90de80ca01ec promisc on sleep 20 /usr/bin/bash /opt/scripts/update/macvlan.sh #============================================================================== -nohup /usr/bin/bash /opt/scripts/update/jekyll_update.sh > /dev/null 2>&1 & +# nohup /usr/bin/bash /opt/scripts/update/jekyll_update.sh > /dev/null 2>&1 & # /usr/bin/mount -t ext4 -w UUID="b7c2c4b8-bfde-479b-80bb-655432a433b8" /opt/wd diff --git a/update/sysmngt.sh b/update/sysmngt.sh index 7df5ed4..f243cf9 100644 --- a/update/sysmngt.sh +++ b/update/sysmngt.sh @@ -4,6 +4,8 @@ if [[ -f "/opt/wd/99-Temp/shutdown" ]]; then poweroff +elif [[ -f "/opt/wd/99-Temp/reboot" ]]; then + reboot fi