blog.iankulin.com

Commands

Outside Temperature From an API in a Shell Script

I describe adding outdoor temperature readings to my homelab server temperature logs to account for ambient temperature changes, using OpenWeather’s free API. A bash script on a VPS polls the weather endpoint every five minutes, extracts the temperature and timestamp with awk and cut, and serves the result as a text file that each server fetches during its logging cycle; the server-side script also loads the drivetemp kernel module to read SSD temperatures. Graphs of 24 hours of data show how ambient temperature, workload, and a CPU stress test affected the three servers...

Mounting NFS shares into LXC containers

I run Syncthing in a Proxmox LXC container as a possible Dropbox replacement and hit a snag when an NFS share from the NAS fails to mount with an access denied error. The cause is the container’s security restrictions, and the fix is to run it as privileged, either by editing its config file or changing the option in the Proxmox web GUI...

Running Multiple Linux Commands in One Line

A quick Linux shell tip on chaining commands on a single line. Using apt update && apt upgrade -y as the example, I explain how the double ampersand runs the second command only if the first succeeds, and briefly mention semicolons and double pipes for unconditional or failure-only execution...

Recursive list of files in Linux

After migrating a media library from an external USB drive to a NAS and reorganising it, I needed a way to verify no files were missed in the move. I walk through building a Linux command-line pipeline using find, grep with regex, and cut to recursively list media files while filtering out directories, metadata, and unwanted filenames. I then feed the resulting clean listing into a spreadsheet for comparison against the original drive...