Auto update check, checks for updates to base system + packages and sends email alerts
-
@wgstarks If I use your code and run the php command it just echoes the contents of the script to the shell.
The original script gets executed instead but has an escape_filter error.
Ok < was missing at the start but still get the same error.
<pre style="white-space: pre-wrap;">PHP ERROR: Type: 64, File: /home/syslog.inc, Line: 875, Message: Cannot redeclare escape_filter_regex() (previously declared in /home/util.inc:4327)</pre>
Interesting looks like it is sensitive to its run path, moving from /home to /root fixes it.
-
@chrcoluk said in Auto update check, checks for updates to base system + packages and sends email alerts:
@wgstarks
Ok < was missing at the start but still get the same error.<pre style="white-space: pre-wrap;">PHP ERROR: Type: 64, File: /home/syslog.inc, Line: 875, Message: Cannot redeclare escape_filter_regex() (previously declared in /home/util.inc:4327)</pre>
Interesting looks like it is sensitive to its run path, moving from /home to /root fixes it.
I suspect what it is sensitive to is that you have other files in /home (that should not be there). The include is searching the local directory before /etc/inc.
-
@dennypage
The actual file has the proper <?php. I likely missed it when I copy/pasted for the forum post. -
I installed the system patches updates and now if I run the command I don't get any notifications regarding any updates even though there is a pfsense+ update available.
Also don't get any errors.
-
@dennypage yeah makes sense, I use home as a work path for when I modify pfsense files before adding them as patches in the system patches area. Root path doesnt have any hence that path been ok.
-
@luckman212 said in Auto update check, checks for updates to base system + packages and sends email alerts:
I'm in the process of upgrading my systems to 23.09.1 and will update this script shortly (if it's possible) to handle the new update mechanism.
Looks like the script was never updated.
️
GitHub shows the latest update was Mar 2nd, 2022 on gist. -
Yes, sorry to everyone who was waiting on that. Timing of other things just got in the way. I'm going to make another attempt at this. Hopefully it will bear fruit.
-
G Gertjan referenced this topic on
-
To anyone following this thread: I'm on pfSense+ 25.07 now and testing a new version of the Auto update check script. Once 25.07 is released (in a few days I expect...) I will push this update, should work on current pfSense 2.8.x / 25.07.
-
I updated the script and the top post. Please report any issues!
-
@luckman212 Ty for your time. Works great on previous stable 2.7.2.
-
@luckman212 I think mine still works from before on 2.8.0, but I have noticed the first post has no link to the github page, do you mind providing it in there?
Output below from the old version, seems good still. (wgstarks)
# /usr/local/bin/php -q /root/pkg_check.php System_Patches: 2.2.20_2 ==> 2.2.22
I will hold of updating the package for now, so if you post the link, I will test the new code.
-
@chrcoluk It's not a full Git repo, just a Gist as of now. The link should be there but it's https://gist.github.com/luckman212/5e69ecf04e000ace47eb8f760b71e160 in case you need. The revisions are visible if you need to refer to the previous version.
-
@luckman212 Thanks, I also see now the link in first post, sorry its obscure as text was same colour.
I confirm it works fine on 2.8.0, both email and cli output work also.
-
It works great! Thanks so much for all your work on this!
-
I'm still on 24.11 and I tried this script to see if it would show me that 25.07 is available, but it didn't catch that. I got some other things though.
-
@mikethiessen Confirmed the behavior you're seeing. I've got a working fix I am testing now, hopefully will push an update tomorrow or Sundat with a more robust check method that properly handles this.
-
Just wanted to reiterate that I put it into a note under Status → Notes, so that the code stays with the gateway, even, if I have to reinstall from a backup. It’s not my idea, but I thought, it’s worth disseminating.
-
@DominikHoffmann If you're going to install a package, you might as well try the Filer package which can store the code and restore it to the correct location as part of the XML backup.
-
@luckman212 Hey, that Filer works great, thanks for the tip. And your Package Check, too! Thanks for all your work.
-
Yeah sorry about the delay on getting the new update script out. That's why e.g. the current script isn't detecting 25.07.1 etc.
I have it almost ready, just had a busy few days here. Should be out real soon now.