I added today the task “Develop master plan for 2018” onto my todo-list for tomorrow… 1.5 weeks left until vacation \o/
Script to "centralize" checking for updates on FreeBSD
I have to administrate several FreeBSD-servers and I need to know which servers need updates. Eveen though I have a poudriere running, I also have a local ports-tree on the machines because they are either not using the poudriere because they are not migrated to it yet or there was some reason to have a locally compiled package. Now I want to know daily which servers need package-updates and if any server has packages that have known CVEs. Thus I update the index of the portstree daily with the following cronjob for root:
0 3 * * * portsnap -I cron updateI have several “classes” of servers, thus I want mails for every class of server. For each class I have a cronjob like this in my personal crontab (or you could put it on one of your servers):
0 6 * * 1-5 /usr/local/scripts/check_for_updates.sh class1The user needs to be able to log into each server with an ssh-key.
#!/bin/sh
TMPFILE=`mktemp`
case $1 in
class1)
SERVERS="server1 server2"
MAILADDRESS="my@mailaddress.foo"
;;
class2)
SERVERS="server3 server4 server5"
MAILADDRESS="my@mailaddress.foo"
;;
private)
SERVERS="privateserver1 privateserver2"
MAILADDRESS="myprivate@mailaddress.foo"
;;
esac
for i in $SERVERS; do
echo "$i:" >> $TMPFILE
update_count=`ssh $i "pkg version" | grep \< | wc -l`
if [ $update_count -gt 0 ]; then
echo "$i needs $update_count updates" >> $TMPFILE
ssh $i "pkg version" | grep \< >> $TMPFILE
echo "" >> $TMPFILE
echo "" >> $TMPFILE
ssh $i "pkg audit" >> $TMPFILE
else
echo "$i needs no updates" >> $TMPFILE
fi
echo "" >> $TMPFILE
echo "" >> $TMPFILE
done
mail -s "$1 update status" $MAILADDRESS < $TMPFILE
rm $TMPFILE
mail -s "$1 update status" $MAILADDRESS < $TMPFILE
rm $TMPFILE
Yeah, the certificate from my university came and I have now officially a Magister. And in good old Magister-tradition I needed 20+ semesters ;)
And tonight I will fill out the application for starting a B.Sc.-program in Computer Science :)
Some very nifty ssh-tips in this article: blogs.perl.org/users/smy…
Order pizza from vim: github.com/arithran/…
Well, FML. macOS 10.13, root-problem published. I set a root-password. I install Security 2017-001 which should fix the problem. I couldn’t even unlock with the set pw, thought I mistyped. I installed 10.13.1 and root works without a password again. Thanks Apple!
And his wive is actually the one who makes the career and he has to move with her and not the other way around. And she looks like a „normal“ woman not like some super sexed up doll. #diehard
Odd thing I find fascinating about Die Hard 1 & 2 is that the hero doesn’t get the some new girl in each movie but that he just tries to save his wive and wants to see his kids.
Why does it at least feel like there are so many tutorials, books and courses about shell-scripting that are just about bash but not about POSIX-shell scripting? With the latter one people can write portable scripts.
An Open Source application that explains that it is designed to be not tied to any one company/service and its only way initially to sync is OneDrive and not something like Nextcloud (planned though) m(
Security vs Business www.commitstrip.com/en/2017/1…
I read a biography about RMS and now I am really thinking about calling the OS GNU/Linux and not just Linux.
Since kids can unlock their parents iPhone Xs with FaceID I can’t wait for the news coming out when the first kid emptied their parents credit card with in-app purchases.
And now the migration assistant fucks up. Once upon a time Intold people to get Macs because “It just works” Apple what happened to you?
I am on Fedora 27 and a #!/usr/bin/env python3 gives me #python 2.7 according to sys.version
But when I run env python3 in the shell it shows me python 3.6
Why???
Woohoo, I have a booting system again. Let’s get this data from the backup again onto the system. Via USB 2……