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

    Post boot script

    Scheduled Pinned Locked Moved 2.4 Development Snapshots
    11 Posts 3 Posters 1.4k 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.
    • P
      PiBa
      last edited by

      Would shellcmd package be of use to run your command? Or it aint firing at the right moment?

      On the other hand, why would you use such a thing? Doesnt pfBlocker automatically update when its scheduled to do so.?

      1 Reply Last reply Reply Quote 0
      • ?
        Guest
        last edited by

        @PiBa:

        Would shellcmd package be of use to run your command? Or it aint firing at the right moment?

        Correct, fires too early, and I don't wan't to use sleeps or loops in the called script to slow it down.

        @PiBa:

        On the other hand, why would you use such a thing? Doesnt pfBlocker automatically update when its scheduled to do so.?

        Yes it does, and that's not a problem, the problem is on reboot.

        1 Reply Last reply Reply Quote 0
        • GertjanG
          Gertjan
          last edited by

          Have a look what the cron-package can do for you.
          cron has a @reboot command that will execute programs at boot. Throwing in an extra "sleep 60" to delay 60 seconds more before running your program or script.

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          1 Reply Last reply Reply Quote 0
          • ?
            Guest
            last edited by

            @Gertjan:

            Have a look what the cron-package can do for you.
            cron has a @reboot command that will execute programs at boot. Throwing in an extra "sleep 60" to delay 60 seconds more before running your program or script.

            I'll take a look. I think my current solution is more elegant  though. 8)

            1 Reply Last reply Reply Quote 0
            • GertjanG
              Gertjan
              last edited by

              I agree.
              But this :
              @marjohn56:

              I have modified the pfsense-rc script to call my 'post-boot' script, …..

              isn't known as elegant ;) an upgrade will blow you out of the water.

              No "help me" PM's please. Use the forum, the community will thank you.
              Edit : and where are the logs ??

              1 Reply Last reply Reply Quote 0
              • ?
                Guest
                last edited by

                @Gertjan:

                Have a look what the cron-package can do for you.
                cron has a @reboot command that will execute programs at boot. Throwing in an extra "sleep 60" to delay 60 seconds more before running your program or script.

                I cannot see anything about @boot in the cron 'Add a cron schedule' page, what am I missing?

                1 Reply Last reply Reply Quote 0
                • ?
                  Guest
                  last edited by

                  @Gertjan:

                  I agree.
                  But this :
                  @marjohn56:

                  I have modified the pfsense-rc script to call my 'post-boot' script, …..

                  isn't known as elegant ;) an upgrade will blow you out of the water.

                  It's a patch I've written, it's set to patch automatically on updates.

                  1 Reply Last reply Reply Quote 0
                  • GertjanG
                    Gertjan
                    last edited by

                    @marjohn56:

                    It's a patch I've written, it's set to patch automatically on updates.
                    Patch ID:  74b2369

                    Nice ! THE proper way to go.

                    cron : I looked at "freebsd man cron" ….
                    edit : Installed this cron package. You're right. The GUI wrapper doesn't permit commands like "@boot". Sorry, useless idea.

                    No "help me" PM's please. Use the forum, the community will thank you.
                    Edit : and where are the logs ??

                    1 Reply Last reply Reply Quote 0
                    • P
                      PiBa
                      last edited by

                      @marjohn56:

                      the problem is on reboot.

                      What problem?

                      1 Reply Last reply Reply Quote 0
                      • ?
                        Guest
                        last edited by

                        @PiBa:

                        @marjohn56:

                        the problem is on reboot.

                        What problem?

                        No pfBlocker rules are loaded. I have to do a force update. My patch and script means I do not have to anymore, it's done automatically.

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