Fix shutdown issue

This commit is contained in:
Kroese 2023-04-17 03:13:00 +02:00 committed by GitHub
parent eb30a4d66f
commit 7208cec5cb

View File

@ -19,12 +19,21 @@ function checkNMI {
echo "Received shutdown request through NMI.." > /dev/ttyS0 echo "Received shutdown request through NMI.." > /dev/ttyS0
/usr/syno/sbin/synoshutdown -s > /dev/null /usr/syno/sbin/synoshutdown -s > /dev/null
exit 0 exit
fi fi
} }
finish() {
echo "Shutting down agent.." > /dev/ttyS0
exit
}
trap finish SIGINT SIGTERM
# Setup serialport # Setup serialport
chmod 666 /dev/ttyS0 chmod 666 /dev/ttyS0