It Survived! Well, Kind Of

On Saturday at midnight PDT, my server rebooted as a part of its weekly updates. When I woke up this morning (PDT), I saw that my blog was down. I was kind of expecting this, considering that there wasn't a service script and it wasn't set to automatically start on startup. When I launched WriteFreely manually, everything was back the way it was.

I've now written an OpenRC startup script for WriteFreely. If you want it for your own use, here it is:

#!/sbin/openrc-run

depend()
{
    need net
}

name="writefreely"
description="Manages WriteFreely"
command="/usr/bin/writefreely"
command_args="-c /etc/writefreely/config.ini"
command_background=true
pidfile="/run/${RC_SVCNAME}.pid"

output_log="/var/log/${RC_SVCNAME}.log"
error_log="/var/log/${RC_SVCNAME}-error.log"

This was mostly taken from https://stackoverflow.com/questions/65942607/how-create-use-services-with-openrc, and I guess you can consider it a derivative of the answer's code. Thus, this little script is technically licensed under CC-BY-SA 4.0. Credits go to Guillermo Roche and William Desportes for the original answer.

Anyways, we're still standing, and we'll see where this blog takes us next! Until next time! :D