tini: Ability to execute a command on start and exit
I was wondering if it is in the scope of tini to allow for execution of a script on start and exit.
Eg something like
tini --boot /etc/init.d/1/boot --shutdown /etc/init.d/3/shutdown my_process
This clearly can be done from “my_process” but I think it may be convenient to add these switches.
Is this something you feel fits in tini or not?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 28 (17 by maintainers)
Commits related to this issue
- Use magic getopt (http://www.daemonology.net/blog/2015-12-06-magic-getopt.html) This lets us support long options easily, which would be needed to support #28. — committed to krallin/tini by krallin 8 years ago
- Add initial support for pre / post commands See #28 — committed to krallin/tini by krallin 8 years ago
- Note that behavior isn't final for pre / post ret See: #28 — committed to krallin/tini by krallin 8 years ago
- Add initial support for pre / post commands See #28 — committed to krallin/tini by krallin 8 years ago
- Note that behavior isn't final for pre / post ret See: #28 — committed to krallin/tini by krallin 8 years ago
- Use magic getopt (http://www.daemonology.net/blog/2015-12-06-magic-getopt.html) This lets us support long options easily, which would be needed to support #28. — committed to krallin/tini by krallin 8 years ago
- Add initial support for pre / post commands See #28 — committed to krallin/tini by krallin 8 years ago
- Note that behavior isn't final for pre / post ret See: #28 — committed to krallin/tini by krallin 8 years ago
For this reason I still use minit.
Another useful feature would be to unsetenv() environment variables after the startup script runs, because of the bad practice of using environment variables for passing passwords to containers.