maintenance script changes

After I wrote the script to put up a maintenance page for my websites, I came up with two more things to display on the page: Timestamp for start of maintenance Reason for maintenance In this post: FreeBSD 15.0 The new script The new script is invoked like this: [14:11 r720-02-proxy01 dvl ~] % ~/bin/offline dev.freshports.org "$(date -R -v +2H)" "Offline for database update" <html> <head> <title>Error 503 Service Unavailable</title> <style> <style> body

maintenance script changes Read More »

Hacking openvpn to use syslog with something other than facility = daemon

I don’t see a way to specify the syslog facility for OpenVPN – perhaps I can change that in the code. It would allow logging openvpn to a specific file and being able to rotate that log file. –log-append does not allow for log rotation. In this post: FreeBSD 15.0 OpenVPN 2.6.19 Signals sent to OpenVPN do not affect logging. Thus, I must rely upon syslog and newsyslog to achieve log rotation. At

Hacking openvpn to use syslog with something other than facility = daemon Read More »

Script to generate that maintenance.html file for taking my websites into maintenance mode

In a recent blog post, I showed you how I was taking my websites into maintenance mode. Shortly afterwards, I wrote about how using $server_name can have odd consequences. Today, I’m writing about the script I just created which will create those maintenance.html files. In this post: FreeBSD 15.0 nginx 1.28.2 bourne shell The script This is the script: [12:17 r720-02-proxy01 dvl /usr/local/www/offline] % cat ~/bin/offline #!/bin/sh # Usage: ~/bin/offline foo.bar "$(date -R

Script to generate that maintenance.html file for taking my websites into maintenance mode Read More »

Using variable names in nginx declarations has a price: e.g. ssl_certificate /usr/local/etc/ssl/${server_name}.fullchain.cer;

I recently implemented a fun (to me) and easy solution for taking my web proxy websites offline, either one-by-one, or all-at-once. Today’s post talks about some of the repercussions which followed one-new-thing I tried. In this post: FreeBSD 15.0 nginx 1.28.2 I jump between testing the test host and stage host; both had similar issues. The relevant changes This is the type of change I started to do. Instead of putting the hostname

Using variable names in nginx declarations has a price: e.g. ssl_certificate /usr/local/etc/ssl/${server_name}.fullchain.cer; Read More »

ddclient 4 changes

After a 4-hour power outage today (crews were working on the power lines), my home IP address changed, perhaps for the first time in over a year. I also noticed ddclient was no longer installed on my host. This blog post outlines changes from the original article. In this post: I’m mostly documenting my local changes based on the previous post. FreeBSD 15.0 ddclient-4.0.0 Updates to the Ansible playbook for ddclient: https://github.com/dlangille/ddclient/ forked

ddclient 4 changes Read More »

Taking your nginx website offline for maintenance? I have an idea.

From time to time, I need to take an nginx webserver or website offline for whatever reason. I might be migrating the database behind the website, the hardware might be powered off for work, etc. In my case, these points might help you follow along with what I’m doing: FreeBSD 15 nginx-1.28.2 there is an nginx proxy in front of the website – this nginx instance has no real content; it uses proxy_pass

Taking your nginx website offline for maintenance? I have an idea. Read More »

Moving MySQL databases into MariaDB

I had a problem with MySQL 8.4 recently. Eventually I gave up and resorted to moving to MariaDB. Switching applications because I hit a problem isn’t something I usually do lightly. Overview Most of the work won’t be shown here. However, this is an overview: Created a new jail on the host: [12:09 zuul dvl ~] % sudo mkjail create -j mariadb01 -a amd64 -v 15.0-RELEASE Add new DNS entries for that jail

Moving MySQL databases into MariaDB Read More »

nagios03: drive recovery

After zpool upgrade blocked by gpart: /dev/da0p1: not enough space, I’ve decided to create a new Azure VM, snapshot the now-faulty-drive, attach it to the host, and start zfs replication to copy the data to new drive. Or something like that. The existing drive needs to be imported with a checkpoint rollback, then copied to a drive with different partition sizes. Here’s the new host: dvl@nagios03-recovery:~ $ gpart show => 34 62984125 da0

nagios03: drive recovery Read More »

Upgrading PostgreSQL in place on FreeBSD

I’ve updated one of my PostgreSQL instances to PostgreSQL 18, it’s time to update the others. This time, I’m going to try pg_update. My usual approach is pg_dump and pg_restore. As this is my first attempt doing this, I’m posting this mostly for future reference when I try this again. There will be another blog post when I try this again. Which should be soon. This paragraph will link to that post when

Upgrading PostgreSQL in place on FreeBSD Read More »

Scroll to Top