Proper way to run script on pfSense shutdown?

  • Hi,
    I'd like to run short script when pfSense is shutting down. Unfortunately there is no option for that in Shellcmd. I believe that it is possible by adding my own rc.d script, but there are some disadvantages with this aproach:

    • it won't be saved in pfSense configuration (like Shellcmd is)
    • I'd have to learn how to properly build rc.d shutdown script ;)
    • I don't know if pfSense introduces changes to rc.d behavior

    I'd be grateful for information if there is pfSense option that would let me do this. If not then maybe there is something easier than rc.d scripts. Mentioned script is supposed to run just one line:

    ssh pi@raspberry_pi_ip './script_to_be_run'

    With authorized_keys set it runs without problems, but now I have to find place to put it in :)

  • So it looks I have to learn how to build rc.d scripts :)

Log in to reply