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.