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

    Shellcmd and complex command

    General pfSense Questions
    2
    2
    1.2k
    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.
    • W
      whites07
      last edited by

      Hi all,
      I installed shellcmd and I set up some commands that pfsense runs at boot time: everything is working well.
      Now I would like to run some other command that is a little bit more complex: there is an if..then..else condition; I tried to use both bash style and tcsh style command but it didn't work; of course when I run the same command manually it works.

      Any suggestion?

      Thanks

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        Put that code inside an actual script somewhere and then call it. Not as nice as a shellcmd, but shellcmd wasn't really designed to handle those sorts of commands.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

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