Navigation

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

    Using Developer Shell - pfSsh.php

    General pfSense Questions
    3
    6
    536
    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.
    • Z
      zMaliz last edited by

      Hi.

      I'm trying out using the developer shell and pfSsh.php.
      The commands I'm running all seem to work as expected and I've successfully created aliases and NAT rules.

      I've saved the commands into a text file 'cmds.txt' and have then tried to feed them into pfSsh.php as follows:

      /usr/local/sbin/pfSsh.php < cmds.txt

      This works fine and the entries are created, however I end up with lots of 'pfSense shell:' prompts scrolling past the screen.. pages and pages of them.
      I've added exit; to the end of my commands but I still get the same.

      Anyone know how to stop that ?

      Thanks.

      1 Reply Last reply Reply Quote 0
      • H
        heper last edited by

        why not just record & save a macro ?

        1 Reply Last reply Reply Quote 0
        • Z
          zMaliz last edited by

          Hi

          My aim is to dynamically update the firewall entries from a script.
          The values the script will use will change on a per entry basis so I don't think a macro will work.

          Any way to stop the shell prompt keep appearing ? I have to CTRL+C to get it to end.

          Thanks

          1 Reply Last reply Reply Quote 0
          • Z
            zMaliz last edited by

            Looks like using exit, not exit; resolves the issue !

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

              Put "cmds.txt" in /etc/phpshellsessions

              Then: pfSsh.php playback cmds.txt

              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
              • Z
                zMaliz last edited by

                Thanks I'll give that a try.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post