💾 Archived View for jsreed5.org › log › 2021 › 202112 › 20211207-avoidable-downtime.gmi captured on 2022-04-29 at 12:27:46. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-12-17)
-=-=-=-=-=-=-
---
Yesterday morning I applied routine kernel and security updates to the Raspberry Pi that serves my capsule. Normally when I apply updates to the Pi I restart it immediately. Yesterday, however, I decided to schedule the restart for midnight. The command I use for issuing a restart is `shutdown -r`, but this time I forgot to include the `-r` flag, which meant I had scheduled a shutdown instead of a restart.
I didn't catch the error until I woke up this morning and tried to visit the capsule. As soon as I saw that it was down, I knew what had happened. I ran upstairs and restarted the Pi, and in seconds the capsule was accessible again. The total downtime was about seven and a half hours.
The Pi is never supposed to shut down permanently unless the physical box is being unplugged. To avoid this possibility in the future, I modified my `.bashrc` thus:
function shutdown { echo "Warning: 'shutdown' aliased to 'shutdown -r'. Use 'command shutdown' to bypass." shutdown -r $@ }
I apologize to any visitors who were unable to reach my capsule overnight.
---
[Last updated: 2021-12-07]