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

Auto update check, checks for updates to base system + packages and sends email alerts

Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
87 Posts 22 Posters 30.8k 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.
  • W
    wgstarks
    last edited by Aug 26, 2024, 1:11 PM

    Should this script also send notifications for package updates? I noticed a few days ago that I had several package updates waiting to be installed but never got a notification. I used to get them but I believe Netgate has made some changes to Package Manager so not sure if its possible to get notifications anymore regarding updates?

    Box: SG-4200

    G 1 Reply Last reply Aug 26, 2024, 1:19 PM Reply Quote 0
    • G
      Gertjan @wgstarks
      last edited by Aug 26, 2024, 1:19 PM

      @wgstarks said in Auto update check, checks for updates to base system + packages and sends email alerts:

      Should this script also send notifications for package updates?

      Both pfSense packages, visible under System > Package Manage r>Installed Packages and non pfSense 'FreeBSD) packages (from the Netgate / pfSense repository) will send you a message / notification / mail.

      Examples of both are shown above. Check out what @slm and @JonathanLee showed.

      No "help me" PM's please. Use the forum, the community will thank you.
      Edit : and where are the logs ??

      W 1 Reply Last reply Aug 26, 2024, 1:26 PM Reply Quote 1
      • W
        wgstarks @Gertjan
        last edited by Aug 26, 2024, 1:26 PM

        @Gertjan
        I think I need another cup of coffee this morning.😁
        The post should have said system patches not packages. Should I get notifications for new system patches?

        Box: SG-4200

        G 1 Reply Last reply Aug 26, 2024, 1:41 PM Reply Quote 1
        • G
          Gertjan @wgstarks
          last edited by Gertjan Aug 26, 2024, 1:42 PM Aug 26, 2024, 1:41 PM

          @wgstarks said in Auto update check, checks for updates to base system + packages and sends email alerts:

          Should I get notifications for new system patches?

          When new patches for the "System_Patches" are created, they are included in the "System_Patches" pfSense package. This will bump the version number. You see this as a new package, "System_Patches" avaible for you.

          Upgrade it, and have a look at the new patch or patches, and apply that interest you, or, by default, apply them all.

          c9b34a12-f2f0-4329-9190-924eef73e200-image.png

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          W 1 Reply Last reply Aug 26, 2024, 1:59 PM Reply Quote 2
          • W
            wgstarks @Gertjan
            last edited by Aug 26, 2024, 1:59 PM

            @Gertjan
            Looks like I need to do some troubleshooting when I get home. When I try to run the command

            /usr/local/bin/php -q /root/pkg_check.php
            

            I get this-

            Could not open input file: /root/pkg_check.php
            

            Box: SG-4200

            P 1 Reply Last reply Aug 26, 2024, 2:08 PM Reply Quote 1
            • P
              provels @wgstarks
              last edited by Aug 26, 2024, 2:08 PM

              @wgstarks Permissions?
              8755598b-9765-4f8c-a314-005bf611f760-image.png

              Peder

              MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
              BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

              W 1 Reply Last reply Aug 27, 2024, 12:46 AM Reply Quote 1
              • W
                wgstarks @provels
                last edited by Aug 27, 2024, 12:46 AM

                @provels
                Actually it was missing completely. After upgrading from a 3100 to my 4200 many (or maybe all) packages were missing so it's not surprising that this script was also missing. Re-created it with the permissions you showed and all is working now.
                Thanks

                Box: SG-4200

                1 Reply Last reply Reply Quote 1
                • S
                  stephenw10 Netgate Administrator
                  last edited by Aug 27, 2024, 1:47 AM

                  That's not a pfSense package so it won't be added when restoring a config unless you've used the filer pkg.

                  W M 3 Replies Last reply Aug 27, 2024, 11:49 AM Reply Quote 0
                  • P provels referenced this topic on Aug 27, 2024, 11:36 AM
                  • W
                    wgstarks @stephenw10
                    last edited by Aug 27, 2024, 11:49 AM

                    @stephenw10 said in Auto update check, checks for updates to base system + packages and sends email alerts:

                    That's not a pfSense package so it won't be added when restoring a config unless you've used the filer pkg.

                    Thanks. The filer package looks like it could be useful. I’ll have to install it and give it a try.

                    Box: SG-4200

                    1 Reply Last reply Reply Quote 0
                    • W wgstarks referenced this topic on Aug 27, 2024, 11:55 AM
                    • M
                      MarinSNB
                      last edited by Aug 27, 2024, 1:48 PM

                      To clarify, if there are no updates to any of the packages, does this script still send an email at the times as specified in your cron job? Thanks!

                      Netgate 6100 Max pfSense+
                      —>Unifi Aggregation/24 Pro PoE/24 PoE Enterprise switches
                      —> UCK2+
                      —> 3x U6E APs

                      W G 2 Replies Last reply Aug 27, 2024, 1:49 PM Reply Quote 0
                      • W
                        wgstarks @MarinSNB
                        last edited by Aug 27, 2024, 1:49 PM

                        @MarinSNB said in Auto update check, checks for updates to base system + packages and sends email alerts:

                        To clarify, if there are no updates to any of the packages, does this script still send an email at the times as specified in your cron job? Thanks!

                        No. At least not in my case. I only get an email when an update exists.

                        Box: SG-4200

                        M 1 Reply Last reply Aug 27, 2024, 1:55 PM Reply Quote 0
                        • W
                          wgstarks @stephenw10
                          last edited by wgstarks Aug 27, 2024, 1:56 PM Aug 27, 2024, 1:54 PM

                          @stephenw10 said in Auto update check, checks for updates to base system + packages and sends email alerts:

                          That's not a pfSense package so it won't be added when restoring a config unless you've used the filer pkg.

                          This question is way off topic for this thread (apologies) but since it looks like the filer pkg docs have been removed from pfsense docs perhaps you can tell me how to use filer to modify what is backed up by the auto config backup? I see a sync tab but the help link just links back to the full pfsense docs.

                          Box: SG-4200

                          S 1 Reply Last reply Aug 27, 2024, 2:04 PM Reply Quote 0
                          • M
                            MarinSNB @wgstarks
                            last edited by Aug 27, 2024, 1:55 PM

                            @wgstarks sounds good! That is what is am finding out here too! Thanks much!

                            Netgate 6100 Max pfSense+
                            —>Unifi Aggregation/24 Pro PoE/24 PoE Enterprise switches
                            —> UCK2+
                            —> 3x U6E APs

                            1 Reply Last reply Reply Quote 0
                            • G
                              Gertjan @MarinSNB
                              last edited by Aug 27, 2024, 2:00 PM

                              @MarinSNB said in Auto update check, checks for updates to base system + packages and sends email alerts:

                              To clarify, if there are no updates to any of the packages, does this script still send an email at the times as specified in your cron job? Thanks!

                              It's 'open source' ;)

                              e32c808f-db6d-4259-9c76-20185708c1eb-image.png

                              As the script language is somewhat backed up English, it says :

                              If the 'message' ($msg) is not empty (so there was a message ! == thing to update/upgrade) then
                              87) log a message in to system log ( here : StatusSystem LogsSystemGeneral )
                              88) show the message on the command line (visible if you executed the command yourself)
                              89) and... send/notify the message by mail.

                              I 'see' you thinking : is it really that simple ? Yes, it is.

                              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 1
                              • S
                                stephenw10 Netgate Administrator @wgstarks
                                last edited by Aug 27, 2024, 2:04 PM

                                @wgstarks It stores custom files base64 encoded in the config. So you could use it to store the pkg_check.php file and it would be restore into a system when you restore the config. Though you might need to do it in several steps or manually save since the first boot would install the Filer package.

                                W 1 Reply Last reply Aug 27, 2024, 2:14 PM Reply Quote 0
                                • W
                                  wgstarks @stephenw10
                                  last edited by Aug 27, 2024, 2:14 PM

                                  @stephenw10 said in Auto update check, checks for updates to base system + packages and sends email alerts:

                                  @wgstarks It stores custom files base64 encoded in the config. So you could use it to store the pkg_check.php file and it would be restore into a system when you restore the config. Though you might need to do it in several steps or manually save since the first boot would install the Filer package.

                                  So if I use filer rather than my usual SFTP for installing custom files they are added to the config which gets backed up by Auto Config Backup correct? So I should delete the current files and re-add them using filer?

                                  Box: SG-4200

                                  G 1 Reply Last reply Aug 27, 2024, 2:29 PM Reply Quote 0
                                  • S
                                    stephenw10 Netgate Administrator
                                    last edited by Aug 27, 2024, 2:20 PM

                                    You don't have to delete them. Filer simply won't do anything if the files are already there. And identical.

                                    W 1 Reply Last reply Aug 27, 2024, 2:23 PM Reply Quote 0
                                    • W
                                      wgstarks @stephenw10
                                      last edited by Aug 27, 2024, 2:23 PM

                                      @stephenw10 said in Auto update check, checks for updates to base system + packages and sends email alerts:

                                      Filer simply won't do anything if the files are already there. And identical.

                                      But the object would be for filer to add the file to the config database.

                                      Box: SG-4200

                                      1 Reply Last reply Reply Quote 0
                                      • G
                                        Gertjan @wgstarks
                                        last edited by Aug 27, 2024, 2:29 PM

                                        @wgstarks said in Auto update check, checks for updates to base system + packages and sends email alerts:

                                        So if I use filer rather than my usual SFTP for installing custom files they are added to the config which gets backed up by Auto Config Backup correct? So I should delete the current files and re-add them using filer?

                                        I never used 'filer' myself, but yes, that's the beauty of the package :
                                        When you export your config, you export it with packages and package 'settings'.
                                        The filer package settings are, amongst others, the files and the place where they are stored.

                                        So, importing the config will import/install the package and will also import the config == settings of the package == big magic : all your private additions (files) are also restored.

                                        For myself, I'm doing things the old fashioned way. Not that I stick dozens of Post-It's on my pfSense (I did that before) but I use the Notes package :

                                        8914b55e-76bf-4dfe-ae51-5ec0ec9fe655-image.png

                                        and I add, for every setting and change that I made a
                                        Why / when / what to observe / where to get it, etc.
                                        So, when I have to re-install pfSense, I also re install these Notes, and I have my road-book ready after a phenix event.
                                        Hummmm. Maybe I should have a closer look at this filer package after all.

                                        No "help me" PM's please. Use the forum, the community will thank you.
                                        Edit : and where are the logs ??

                                        W 1 Reply Last reply Aug 27, 2024, 3:00 PM Reply Quote 1
                                        • W
                                          wgstarks @Gertjan
                                          last edited by Aug 27, 2024, 3:00 PM

                                          @Gertjan
                                          Thanks for the Notes suggestion. I lost a few packages recently and been thinking about creating a pfsense logbook since it looks like some packages in Package Manager don’t get included in backups and I’m willing to bet custom packages that aren’t in package manager won’t be either. This looks like it’s perfect for that.

                                          Box: SG-4200

                                          1 Reply Last reply Reply Quote 0
                                          58 out of 87
                                          • First post
                                            58/87
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            This community forum collects and processes your personal information.
                                            consent.not_received