Using systemd Timers to Renew Let’s Encrypt Certificates

This is a quick blog post to share the systemd timers that I use to automate the renewal of my Let’s Encrypt certificates. I prefer systemd timers to cron jobs for task scheduling because they are more flexible and easier to debug. I assume that you know what Let’s Encrypt is and that you already […]

Replacing Cron Jobs With systemd Timers

systemd has a timer function that can be used to run tasks periodically — yes, like cron. There’s nothing really wrong with cron, but have you ever tried to debug a cron job on a server? The script runs fine from the command line, but nothing seems to happen when it runs from cron. You quickly type […]

systemd service to trim free SSD cells at boot

I mount all ext4 partitions on my solid-state disks with the discard option; this tells the filesystem to use SSD-specific low-level TRIM operations instead of normal erases (which are essentially just block re-writes). As I use my SSDs quite heavily, I like to perform batch discards every so often as well. Here’s a systemd service […]

Fix backlight after resume on Linux 3.8 + Intel graphics

For some reason Linux 3.8 doesn’t resume from suspend properly on my Samsung Series 9 NP900X3C. From the comments on this Arch bug report it seems that the system is actually resuming, but the display back light isn’t coming back on. One user suggested using systemd to run the following script at system resume, /usr/lib/systemd/system-sleep/ […]