DoYouEvenHTML
DoYouEvenHTML

Reputation: 33

Debian runlevel scripts not running on shutdown, reboot, etc. Priorities?

I have a problem, where my shutdown runlevel MySQL bash scripts are not executed. rcS.d, however works always.

I used scripts in init.d folder to be run on different runlevels. Currently, the only one I have gotten to work, is the bash script that inserts a row about the server booting up.

The problem is, that when I use the same method to run a script while the runlevels are 0 or 6, for example, the script is never run. I think it might be a priority issue. Look at the picture below (The priority is the same as the kill priorities for apache, etc...). Are the scripts run in alphabetical order or could I bump all priorities up by one somehow?

I'm guessing the problem is that the services are killed before the script is run - apache killed @ 1 & mysql killed @ 2. The same script works for booting up - a bash mysql insert command in the file.

enter image description here

Upvotes: 0

Views: 309

Answers (0)

Related Questions