Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Custom script in /usr/local/etc/rc.d, execution order/trigger question.

    Scheduled Pinned Locked Moved General pfSense Questions
    5 Posts 2 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • w0wW
      w0w
      last edited by w0w

      It looks like script placed in /usr/local/etc/rc.d executes twice, on startup and on shutdown. Am I right?
      At least when I reboot using console menu, pfSense gives some message in console about stopping custom scripts and script produces some output, I just tested it with test output file. When I just quit the pfSense menu going to shell and typing reboot, script then runs only once on next boot. Is it expected behavior?

      1 Reply Last reply Reply Quote 0
      • K
        kpa
        last edited by

        https://www.freebsd.org/cgi/man.cgi?query=rc&sektion=8

        w0wW 1 Reply Last reply Reply Quote 0
        • w0wW
          w0w @kpa
          last edited by

          @kpa
          Are you sure that it's applicable to pfSense?

          1 Reply Last reply Reply Quote 0
          • K
            kpa
            last edited by

            The behaviour of /usr/local/etc/rc.d scripts in pfSense matches what is described in that manual page so I have to assume that part is unchanged in pfSense.

            w0wW 1 Reply Last reply Reply Quote 1
            • w0wW
              w0w @kpa
              last edited by

              @kpa
              Thanks.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.