Feature #3667
closedHook for user shutdown script - "/etc/rc.custom_shutdown"
90%
Description
There remains no simple feature for a user to run their custom rc scripts during shutdown. (without resorting to writing their own packages). Many of us don't have the wherewithal for all that fuss (packages, php, xml) for something very simple. But It's important to gracefully stop a service and release it's resources back.
The equivalent feature on other platforms (FreeNAS and NAS4Free) is to provide a simple GUI page where users can specify their own list of "POSTINIT" and "SHUTDOWN" scripts to run. It isn't hidden away or anything.
Anyway. Please find provided a small patch to enable executing a custom command during shutdown. It is the opposite partner of "/etc/rc.custom_boot_early", with the same behaviour as that. It is a hidden method. If the script isn't present (the file does not exist by default), then nothing will be executed. But if a user creates a file named "/etc/rc.custom_shutdown", and makes it executable, then that file will be executed at shutdown time. Right after stop_packages().
Please add this important functionality to the pfSense 2.2-beta codebase. I'm sending you the pull request today.
Updated by Dreamcat Four over 10 years ago
Pull request:
https://github.com/pfsense/pfsense/pull/1197
The proposed solution also solves another similar issue I raised previously: https://redmine.pfsense.org/issues/3615.
So please consider that fulfilled also.
Updated by Dreamcat Four over 10 years ago
Signed up to Contributor License Agreement.
Updated by Jim Thompson over 10 years ago
- Assignee set to Renato Botelho
assigned to Renato for evaluation.
Updated by Renato Botelho over 10 years ago
- Status changed from New to Needs Patch
As Ermal mentioned on pull request comment, it needs to be improved. We can keep the technical discussion there.