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.
-
This post is deleted! -
@luckman212: Looking forward to the update! Would you include a reply in this thread, when you’re done with that?
-
@luckman212 said in Auto update check, checks for updates to base system + packages and sends email alerts:
to handle the new update mechanism.
It did tell me (mail) that the 'curl' package was available, a coupe of days ago. So, for me, it works
Also : if the pfSense GUI doesn't show others pfSense version, like : Current ..., Previous .... or Development ... then this script can't do more neither.
-
The dashboard uses the new
-C
switch for pfSense upgrade to check all configured branches for newer release versions. -
-
-
-
-
@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.
Hi! Did you ever get around to updating your script?
-
What a gem of a thread!!!
-
@luckman212 said in Auto update check, checks for updates to base system + packages and sends email alerts:
/usr/local/bin/php -q /root/pkg_check.php
Thank you
-
@JonathanLee said in Auto update check, checks for updates to base system + packages and sends email alerts:
@luckman212 said in Auto update check, checks for updates to base system + packages and sends email alerts:
/usr/local/bin/php -q /root/pkg_check.php
Thank you
That's the command you paste into a cron task.
"cron" itself is a pfSense package :
it permits you to show the already present cron tasks, and add your own.
-
-
@Gertjan :) first message
-
-
-
-
@luckman212 Confirmed that if you change
notify_via_smtp($msg);
tonotify_all_remote($msg);
it will pick up the configuration of Slack and send the notification$msg
property to Slack as well. -
Incidentally...
WRT the Slack Bot/App setup I followed the example shown here - Slack Bot OAuth Access Token, and merely copied the Slack details into the Slack section under Systems -> Advanced -> Notifications. For the API Key it's the
xoxb-...
key for the Slack app. -
-
@DominikHoffmann not sure if you've tried the existing script, but it works as is with email. No changes required for me. Cheers!
-
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?
-
@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.
-
@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? -
@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.
-
@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
-
@wgstarks Permissions?
-
@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