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

    Havp template customisation

    Scheduled Pinned Locked Moved pfSense Packages
    5 Posts 2 Posters 5.2k 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.
    • D
      diddledan
      last edited by

      After customising the template for havp a while back (2.0alpha, maybe?) and then doing a "firmware upgrade" the havp package was updated also. Unfortunately this nuked my template customisations by overwriting the /usr/share/examples/havp/templates/* files with the ones from the package without checking if they had been modified.

      Can somebody please advise the official way of maintaining these template customisations (to remove the "your company here" text, for e.g.) between upgrades of the package/OS.

      Alternatively is there supposed to be a way of creating the files outside the /usr/share/examples/havp tree (as it should be done) and updating the havp configuration file to match without the system overwriting the customised location with the default for the language chosen within the gui? (e.g. /usr/share/examples/havp/templates/en/ when English is chosen in the GUI.)

      1 Reply Last reply Reply Quote 0
      • D
        dvserg
        last edited by

        You can use a different directory for custom templates.. For example /usr/share/examples/havp/templates_custom/.
        This should be safe for your templates from being overwritten when reinstalling HAVP.
        Specify the path to your directory you can define in /usr/local/pkg/havp.inc

        SquidGuardDoc EN  RU Tutorial
        Localization ru_PFSense

        1 Reply Last reply Reply Quote 0
        • D
          diddledan
          last edited by

          excellent, thankyou! that should be just what I need :-)

          1 Reply Last reply Reply Quote 0
          • D
            dvserg
            last edited by

            @diddledan:

            excellent, thankyou! that should be just what I need :-)

            Defines in havp.inc

            define('HVDEF_TEMPLATES',               '/usr/local/share/examples/havp/templates');
            define('HVDEF_TEMPLATES_EX',            HVDEF_TEMPLATES . '_ex');
            

            Try use /usr/local/share/examples/havp/templates_ex to your templates. This is used without any havp.inc modifications and must be stored even if HAVP will reinstalled.

            SquidGuardDoc EN  RU Tutorial
            Localization ru_PFSense

            1 Reply Last reply Reply Quote 0
            • D
              diddledan
              last edited by

              even better. Thankyou for the extra research. I can confirm that placing my version of the en/ templates into the templates_ex directory does utilise them appropriately instead of the original examples.

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