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

    Is there a recommended location to put custom scripts to...???

    Development
    5
    5
    1.3k
    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.
    • U
      Ulrich Neu
      last edited by

      Hi there...

      ...trying to figure out where to put custom script code on the pfSense...talking about (bash/shell) scripts and ssh keys and stuff...

      Would like to see the scripts survive any reboot / upgrade / reinstall of pfSense and / or packages...

      Just put 'em in /home/myNewlyCreatedDir ...???

      Any hints/suggestions appreciated...

      THX

      GrimsonG GertjanG 2 Replies Last reply Reply Quote 0
      • GrimsonG
        Grimson Banned @Ulrich Neu
        last edited by

        @Ulrich-Neu said in Is there a recommended location to put custom scripts to...???:

        Would like to see the scripts survive any reboot / upgrade / reinstall of pfSense and / or packages...

        A reinstall will format the drive, so no manually placed file will survive that.

        Use the "Filer" package and your custom scripts will be included in the config backup and should survive most actions.

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

          @Ulrich-Neu
          I'm log in as root, so I just use /root/
          Some of my files are there for a decade or so.
          If needed, change attributes and/or owner.

          Just keep in mind : keep a local copy of everything you put on pfSense.
          Just in case you need to re install (hardware tends to last less as a humans live).

          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
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            The most likely place to be left alone is /root/ or /conf/. Though files you put into common locations under /usr/local/ will stay, it's more difficult to keep track of them there. Easy to forget.

            Either way, you'll want to keep backups, and the Filer or Backup package can help there.

            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
            • NogBadTheBadN
              NogBadTheBad
              last edited by

              I use /root/scripts as @jimp said keep backups.

              Andy

              1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

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