mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
busybox: implement a custom 'shutdown' script. use with care!
closes #2097
This commit is contained in:
parent
b4886ff7cd
commit
8d68698bdb
@ -27,7 +27,18 @@
|
||||
omit_pids+=( $@ )
|
||||
}
|
||||
|
||||
_shutdown_script () {
|
||||
SHUTDOWN="/storage/.config/shutdown.sh"
|
||||
if [ -f $SHUTDOWN ]; then
|
||||
echo '!!! SHUTDOWN script detected !!!' | logger -t shutdown.sh
|
||||
cat "$SHUTDOWN" | logger -t shutdown.sh
|
||||
echo '!!! -End of shutdown script- !!!' | logger -t shutdown.sh
|
||||
sh $SHUTDOWN
|
||||
fi
|
||||
}
|
||||
|
||||
_safe_shutdown () {
|
||||
_shutdown_script
|
||||
add_omit_pids $(pidof connmand)
|
||||
add_omit_pids $(pidof dbus-daemon)
|
||||
killall5 -15 ${omit_pids[@]/#/-o }
|
||||
|
Loading…
x
Reference in New Issue
Block a user