Contents
What does invoke-RC D do?
d is a generic interface to execute System V style init script /etc/init. d/name actions, obeying runlevel constraints as well as any local policies set by the system administrator. All access to the init scripts by Debian packages’ maintainer scripts should be done through invoke-rc.
What is policy RC D?
The policy-rc. d script has only one job: it should tell to invoke-rc. d if the action is allowed or not, by using its exit status. An exit status of 0 means “action allowed”; an exit status of 101 means “action not allowed”.
What’s the difference between invoke-rc.d and service?
It seems like service is the user-oriented command, while invoke-rc.d is there for other uses. Problem could be because your script is trying to use invoke-rc.d (which doesn’t work because there are no runlevels in a docker container) before trying the service command (which will work).
What should the status code of invoke-rc.d return?
Warning: this is usually a very bad idea for any actions other than start. Should an init script be executed, invoke-rc.d always returns the status code returned by the init script. Init scripts should not return status codes in the 100+ range (which is reserved in Debian and by the LSB).
What does invoke-rc.d do in Debian?
invoke-rc.d is a generic interface to execute System V style init script /etc/init.d/ name actions, obeying runlevel constraints as well as any local policies set by the system administrator. All access to the init scripts by Debian packages’ maintainer scripts should be done through invoke-rc.d .
Why does invoke-rc.d not work in Docker?
Problem could be because your script is trying to use invoke-rc.d (which doesn’t work because there are no runlevels in a docker container) before trying the service command (which will work). So change the if conditions in the script or the lazy way is make it look for a non-existent path so it will use the service command. eg: