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

    Best Practices for Installing Custom Scripts

    Scheduled Pinned Locked Moved Off-Topic & Non-Support Discussion
    3 Posts 2 Posters 1.0k 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.
    • G
      guardian Rebel Alliance
      last edited by

      I'm wondering what the best approach is for installing custom scripts for ease of maintenance (and if possible surviving an upgrade).

      I want to run a couple of small scripts triggered by a cron job to do some custom logging.

      Best place to store/run the script from?

      How to best backup/restore the cron tab entry when doing an update (or a reinstall if the SSD dies)?

      Thanks.

      If you find my post useful, please give it a thumbs up!
      pfSense 2.7.2-RELEASE

      1 Reply Last reply Reply Quote 0
      • P
        phil.davis
        last edited by

        How to best backup/restore the cron tab entry when doing an update (or a reinstall if the SSD dies)?

        Use the Cron package. That provides a GUI for you to add/modify cron jobs, which are saved in the config and the crontab is automatically created from the config.

        I will let someone else suggest where is best to put your own scripts.

        As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
        If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

        1 Reply Last reply Reply Quote 0
        • G
          guardian Rebel Alliance
          last edited by

          Thanks, that's half the problem solved.  If someone could make a suggestion as to best practices for storing/backup/recovery of custom scripts that would be much appreciated.

          If you find my post useful, please give it a thumbs up!
          pfSense 2.7.2-RELEASE

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