Allowing Wordpress updates to actually work via SSH

Submitted by davidc on Fri, 09/11/2020 - 19:25

In a world where FTP has finally been turned off by most ISPs, Wordpress allegedly supports SSH2 for upgrades instead, using FS_METHOD ssh2. However it fails to work in any real-world scenario because it assumes the filesystem paths on the remote host are the same as on the local filesystem.

This obviously fails with pretty much any ISP on earth as the users are chroot()ed, so a directory that was once perhaps /home/david/ would in fact be just / when accessed over SFTP.

GSM Modem-kicking Script for RouterOS

Submitted by davidc on Fri, 09/14/2018 - 16:23

I seem to be spending a lot of my time recently hacking around RouterOS bugs. Here's a script that monitors the state of the PPP interface for a GSM modem and does what it can to get it back up and running if necessary.

The script checks three times (10 seconds apart) to see if the PPP interface is connected. If it still isn't, it resets the USB power to try and kick the communication back to life. It waits 30 seconds after doing this then, if it's still not up for two more checks, it reboots the whole Routerboard.

Fallback PPPoE credentials on RouterOS

Submitted by davidc on Tue, 06/26/2018 - 22:11

RouterOS has no native concept of fallback PPPoE credentials. You can only enter one username and password per interface. Sometimes you would like to enter a fallback set that are tried if the primary credentials don't work, for example to prepare for a migration. Here is a RouterOS script to handle fallback PPPoE credentials that will be tried one after another until one set succeeds.

Converting Acrobat checkboxes to radio buttons

Submitted by davidc on Sun, 06/19/2016 - 14:29

Acrobat's automatic form generation is atrocious. It inevitably gets almost everything wrong, meaning you have to recreate it by hand. It boggles the mind that it's had the ability to create forms for 20 years now, and still has no way of automatically creating the form from a Word document without a buggy and and half-hearted attempt at auto-detection. You'd think at the very least it would be able to turn Word form elements into PDF form elements, but no.

Cisco routers with German VDSL2

Submitted by davidc on Thu, 12/05/2013 - 18:55

Customers wishing to use their own router with VDSL2 (FTTC) services in Germany are hampered by the CPE not supporting PPPoE passthrough, as Telekom limits the line to 1 PPPoE session. The CPE therefore needs to be replaced entirely. This article describes how to extract the login information from an O2 Homebox and then configure a Cisco router as a replacement CPE.

Booting from an HTTP-accessible image in HP iLO2

Submitted by davidc on Wed, 09/21/2011 - 04:09

HP's integrated lights-out management is a godsend, and has saved the day on more than one occasion. But for installing new servers, it's a pain to have to present the media: (a) insert a physical CD into the enclosure drive (b) attach a USB CD drive (c) use the virtual media applet or remote console virtual media over a slow connection, or (d) find a local Windows machine and use the remote console RDP.