tinycorelinux/Core-scripts

/opt/shutdown.sh not executed during shutdown

thirdwheel opened this issue · 5 comments

Hi

I use TCL to run a pair of Minecraft servers for my son and I, and noticed that there was a script in /opt that I could add shutdown commands to, however when I tried to do this to send shutdown commands to my Minecraft server instances and wait for them to quit, the script wasn't executed at all. When I checked the /etc/init.d/rc.shutdown script, I noticed that it doesn't call this script at all.

/opt/shutdown.sh is called from /usr/bin/exitcheck.sh

Thanks @paul-1 - I had a look at exitcheck.sh which claims to be called from exittc, which in turn has one line that sends a TERM signal to $XPID, and makes no mention of exitcheck.sh at all.

clbr commented

Line 93 of exittc.cxx?

That file is not in this repository?

The source is in https://github.com/tinycorelinux/fltk_projects That source gets compiled into an extension, that would not be typically downloaded in a non-desktop system.

I have just built shutdown scripts that calls exitcheck.sh instead of running "sudo reboot". Or you can make local edits to rc.shutdown and save them in your backup. Whatever your prefer to do.