May The 4th Be With You!

Happy Star War Day!

In a change to my more normal technical blogs, I wanted to talk about my other passion Star Wars. Having recently been made aware of the Obi-Wan Kenobi – The Patterson Cut. This led me to 2 other fan edits I had been oblivious of for several years. Star Wars Episode I.I: The Phantom Edit & Star Wars Episode II.I: Attack of the Phantom, by Mike J. Nichols; more details can be found here.

With Stars Wars day upon us, I wanted to watch a New Hope and Empire Strikes Back and over the weekend have a bit a binge session.  Normally my watch order would consist of the Machete Order. (With some optional extras such as Solo And Rogue One). This order misses out Phantom Menace, but wanting to watch the fan edit, I’m going to try a new order. This order I’m going to list below (I’ve already watched a couple, but I’ll update this post with how the binge went). Before I continue with this new watch order I’m trying/suggesting, I should say it’s for those who have seen the films; if you are trying to introduce a friend to the series I would go with the Machete Order.

Watch Order:-

Star Wars Episode I.I: The Phantom Edit (Watched)
Star Wars Episode II.I: Attack of the Phantom (Watched)
Star Wars: Episode IV – A New Hope
Star Wars: Episode V – The Empire Strikes Back
Star Wars: Episode III – Revenge of the Sith

Optional:-

Obi-Wan Kenobi: The Patterson Cut
Solo: A Star Wars Story
Rogue One: A Star Wars Story

Watch Order:-

Star Wars: Episode VI – Return of the Jedi

Here you can chose to the end the binge on a high or watch the sequel trilogy.

As you can see I’ve ready watched the Phantom edits, I can say prefer these over the original releases. I will let know how well this watch order went.

Edit 24th May,
Apologies for the delay in updating.  All I can say I enjoyed this viewing arc, but that being said I would probably enjoy Star Wars in any order. If the Machete gets 5 stars, this gets 3.5. I watched in the described above,  I think it works seeing Anakin’s first steps down his dark path, but still leaves the final reveal to ESB. Also I think Obi-Wan Kenobi works betters as a film.

All comments are welcome.
Thanks Tom.

Generate CSR with SAN on CPanel

As reported in my last post, there is an issue with cPanel generated CSRs, which include the common name in the SAN (Subject Alternate Name); with some SSL suppliers.  The same issue occurs with CSRs, that actual require SAN; such as Organization Validated (OV), and Extended Validation (EV) SSLs.

I’ve created a script, which creates an CSR with a SAN; which only contains the alternative names not the common name. It can be found here.

All comments are welcome.
Thanks Tom.

Generate CSR without SAN on CPanel

The cpanel gui for generating CSRs, creates a common name and a san (subject alternative name); containing the same value. I have seen this cause issues with ordering SSLs. So I’ve created an interactive script, that creates a CSR with just the common name. Download the script run it and follow the instructions. Script can be found here.

All comments are welcome.
Thanks Tom.

DHT22 Temperature & Humidity SNMP sensor, with LCD display

LCD

Today I received a DHT22 probe for my pi4:
Pxyelec DHT22 1-Wire Bus DC 5V

To replace:
https://thepihut.com/products/temper2-usb-dual-temperature-sensor

Which I’ve mentioned in a couple of previous blogs, for example:
https://blog-tomsdomain.co.uk/2018/11/25/raspbian-debian-thermometer/

I also wanted to to add an LCD screen (see above), which I already had:
SunFounder-Display

More info can be found on my github repo

All comments are welcome.
Thanks Tom.

Mass Generate CSRs & Install SSLs on CPANEl

Couple of scripts to make it easier to mass generate CSRs & install the SSLs on mass as well:

CSR Script
SSL Install Script

Both require a csv spreadheet called domains.csv, 1st column domain, 2nd username. For the csr generation if company details are not constant, add columns to csv file and use awk to generate variables. For example if country is the third, add as a variable like this:

country=$(awk -F, -v r=$linenumber -v c=3 ‘{if(NR==r)print $c}’ domains.csv)

CPANEL’s gui for generating CSRs, auto includes Subject Alternative Name (SAN). Which some SSLs providers don’t support or I’ve seen issues preventing a cert covering both the domain and www and then requires a reissue. This script generates a single CSR without a SAN.

All comments are welcome.

Thanks Tom.

OSMC nfs-server plugin

Hi,

Recently found some inspiration to look at this again. Now installable as addon, no need to edit keymaps. Just run the addon and follow the instructions, available for both kodi 18 & 19:

kodi 18
kodi 19

Kodi 18 takes longer to start as it has additional dependences.

Git Repository can found here, again please comment below.

Thanks Tom.

Raspian/Debian Thermometer Update – SystemD Timer

Hi this an update to a post from a couple of years ago:

https://blog-tomsdomain.co.uk/2018/11/25/raspbian-debian-thermometer/

Specifically the scheduling of a job to run the temperature check & send email email alert if required, with a SystemD timer rather than a Cron job. Also removing the requirement for a separate python script. The temperature check and alert is now all done with one bash script.  The script does now require installing msmtp, this does require some configuration to work with an external mail server (as did the python script in the original post); a quick google search should give you all you need; if not please comment and I’ll assist further.

Updated bash script (/home/pi/temp-check.sh):

#!/bin/bash
TEMP=$(/usr/local/bin/tempered | grep -oP '(?<=/dev/hidraw1 0: temperature) [\d.]+')
MAXTEMP=40
if [ $TEMP \> $MAXTEMP ];
then
echo -e "Subject: $TEMP°c Temperature is to high! \r\n\r\n$TEMP°c Temperature is to high!" |msmtp [email protected] -t [email protected]
else
echo "Temperature" $TEMP"°c, normal";
fi;
unset TEMP MAXTEMP

Just set the MAXTEMP variable, to the maximum desired temperature.

Now the SystemD timer, first thing is to create the service unit (/lib/systemd/system/check-temp.service):

[Unit]
Description=Temperature Check

[Service]
Type=simple
ExecStart=/home/pi/temp-check.sh

[Install]
WantedBy=multi-user.target

Next the timer unit is created (/lib/systemd/system/check-temp.timer):

[Unit]
Description=Check Temperature Timer

[Timer]
OnCalendar=*:0/15
Unit=check-temp.service

[Install]
WantedBy=timers.target

Here the timer is scheduled to run every 15 minutes, this can be increased and decreased, more details can be found here.

To schedule the job, please run:
$ sudo systemctl start check-temp.timer

So it persists after a reboot please issue:
$ sudo systemctl enable check-temp.timer

And that’s it, temparature check and aleart should now be scheduled via a SystemD timer.

Centos 8 Desktop (Workstation) Kickstart File

Being a long time user of Fedora and a frequent browser on their discourse. I quite often see posts, where users do not want to move on from a version of Fedora which they consider stable, but the version is EOL. These sort of posts are quite often followed with suggestions to use Centos rather than Fedora. Problem with this is that Centos is more of a server distro, and although its possible to install a desktop environment, it isn’t as straight forward as it is with other distros. This is why I have created a kickstart file:

https://github.com/tomdoyle87/ks-centos-desktop

Which I hope takes the hardwork out setting Gnome-workstation with Centos 8. It also includes TLP to improve battery life, is only enabled on Laptops. I looked at the way Fedora does this, but this would require changes to kernel; which is beyond the scope of this project.

Thanks Again, all comments are welcome,

Tom.

Kodi-NFS-Server, for OSMC

Hi,

Here is a script for setting up an NFS server that works within kodi for OSMC, for both kodi 18 & 19; I’ve also created created an uninstall script. This wouldn’t have been possible without the help of bmillham who is a member of the OSMC team.

Install: https://github.com/tomdoyle87/osmc-nfs-server-python3/blob/master/Kodi-nfs-server-setup.py 2

Uninstall: https://github.com/tomdoyle87/osmc-nfs-server-python3/blob/master/Kodi-uninstall-nfs-server.py

The easiest way is to map some shortcuts to some keys for example f11 & f12, for example (will need to use the command line):

cd /home/osmc/.kodi/userdata
wget https://raw.githubusercontent.com/tomdoyle87/osmc-nfs-server-python3/master/Kodi-nfs-server-setup.py
wget https://raw.githubusercontent.com/tomdoyle87/osmc-nfs-server-python3/master/Kodi-uninstall-nfs-server.py

Then add the following to keyboard.xml or remote.xml (in the global section):

XBMC.RunScript(special://home/Kodi-nfs-server-setup.py)
XBMC.RunScript(special://home/Kodi-uninstall-nfs-server.py)

If you need any further assistance with setting up, please comment below. Also I will gladly receive any thoughts or feedback.

Currently only works with OSMC, but shouldn’t require many changes to work on other linux based kodi platforms; glad to help anybody looking to do this, again please comment below.

Thanks Tom.

APF Fork, APF-SystemD

Good Evening,

Readers of my previous posts, will be aware I noticed issues with apf under systemd; further details can found here.

Further updates and improvements were reported here. On a side note I’ve never received a response to the issue I raised on rfxn’s github.

I acknowledge that life can take people away from open-source projects , so I’ve created my own fork with some extras. Not only have I made improvements over the systemd solution provided on this blog previously. The fork also includes auto update with email alert and an un-install bash script.

The fork can be found on github.

Thanks Tom.

P.S Please feel free to comment.