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

    Run shell command at pfsense reboot

    Scheduled Pinned Locked Moved General pfSense Questions
    13 Posts 7 Posters 5.9k 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.
    • pttP
      ptt Rebel Alliance
      last edited by

      Have you tried with the "shellcmd option" option ?

      https://doc.pfsense.org/index.php/Executing_commands_at_boot_time

      1 Reply Last reply Reply Quote 0
      • D
        doktornotor Banned
        last edited by

        @mariusblk:

        what have i done wrong?

        You installed Java on your firewall…  :'( :(

        1 Reply Last reply Reply Quote 0
        • C
          Cino
          last edited by

          @doktornotor:

          @mariusblk:

          what have i done wrong?

          You installed Java on your firewall…  :'( :(

          LOL

          I was going to do that at one point but decided to have it run on my windows server that is up 24/7 instead

          1 Reply Last reply Reply Quote 0
          • M
            mariusblk
            last edited by

            @ptt:

            Have you tried with the "shellcmd option" option ?

            https://doc.pfsense.org/index.php/Executing_commands_at_boot_time

            I'm not sure if i insert the <shellcmd>in the right spot … i'll try to run it</shellcmd>

            1 Reply Last reply Reply Quote 0
            • M
              mariusblk
              last edited by

              @Cino:

              @doktornotor:

              @mariusblk:

              what have i done wrong?

              You installed Java on your firewall…  :'( :(

              LOL

              I was going to do that at one point but decided to have it run on my windows server that is up 24/7 instead

              And why is it such a bad idea, point me to something.

              1 Reply Last reply Reply Quote 0
              • D
                doktornotor Banned
                last edited by

                @mariusblk:

                I'm not sure if i insert the <shellcmd>in the right spot … i'll try to run it</shellcmd>

                There's this Shellcmd package to solve that for you via GUI. :D

                @mariusblk:

                And why is it such a bad idea, point me to something.

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

                  Java on my server has been flawless.

                  Java on my personal computer nags me more than a clingy GF.

                  1 Reply Last reply Reply Quote 0
                  • C
                    Cino
                    last edited by

                    There is a shellcmd package that you can install which will insert them into the config.xml correctly.

                    Its just not good practice to run anything on a fw. But it's your fw, so you can install anything you want.. but if it conflicts with the pfsense core system, you may be able to get support from pfsense or the forum.

                    Java itself is always being updated due to security issues… I won't recommend it but play it safe... stay update with updates, and make sure its not binding to your WAN or any interface you dont want it on

                    1 Reply Last reply Reply Quote 0
                    • M
                      mariusblk
                      last edited by

                      I installed the package with shellcommand added the line but doesn't work, on pfSense startup

                      "Starting NTP time client …. done
                      Starting DHCP Service .... done
                      "
                      and freezes. I can access webConfigurator with no problem, links are up, internet is working, java process is starting and Unifi Controller is up and running.

                      I can access server using putty and there is no problem, any hints why the visuals on pfsense server halt at that point?

                      1 Reply Last reply Reply Quote 0
                      • A
                        alfredo
                        last edited by

                        Am having the same problem with Java/Shellcmd. The booting gets stuck at "Configuring Firewall"

                        Any Ideas?

                        Thanks

                        Alfredo.

                        1 Reply Last reply Reply Quote 0
                        • S
                          Stugots
                          last edited by

                          I wouldn't recommend running that software on your firewall.  I run UniFi on a Raspberry Pi at home.

                          PC Engines APU2C4

                          1 Reply Last reply Reply Quote 0
                          • A
                            alfredo
                            last edited by

                            Thanks; we're not running Unify; we're using java for a very secure internal program. pfSense can't finish booting

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