Hey #MastoAdmin critters: Want to switch to OpenRC on your Masto box? I translated the init scripts to openrc style!

Web:

#!/sbin/openrc-run

description='mastodon-web'

supervisor=supervise-daemon
command_background=true
pidfile="/run/${RC_SVCNAME}.pid"

command_user=mastodon
supervise_daemon_args='--chdir /home/mastodon/live'

export RAILS_ENV=production
export PORT=3000
export LD_PRELOAD=libjemalloc.so

command=/home/mastodon/.rbenv/shims/bundle
command_args='exec puma -C config/puma.rb'

depend() {
after net
}

reload() {
kill -SIGUSR1 $(cat $pidfile)
}

Sidekiq:

#!/sbin/openrc-run

description='mastodon-sidekiq'

supervisor=supervise-daemon
command_background=true
pidfile="/run/${RC_SVCNAME}.pid"

command_user=mastodon
supervise_daemon_args='--chdir /home/mastodon/live'

export RAILS_ENV=production
export DB_POOL=25
export MALLOC_ARENA_MAX=2
export LD_PRELOAD=libjemalloc.so

command=/home/mastodon/.rbenv/shims/bundle
command_args='exec sidekiq -c 25'

depend() {
after net
}

Streaming:

#!/sbin/openrc-run

description='mastodon-streaming'

supervisor=supervise-daemon
command_background=true
pidfile="/run/${RC_SVCNAME}.pid"

command_user=mastodon
supervise_daemon_args='--chdir /home/mastodon/live'

export NODE_ENV=production
export PORT=4000
export STREAMING_CLUSTER_NUM=1

command=/usr/local/bin/node
command_args='./streaming'

depend() {
after net
}

#OpenRC #FuckSystemd

@Viss yes #FuckSystemD today, yesterday, tomorrow and every day
Yet another #FuckSystemD day
I enable systemd-resolved service as advised to address an issue, and first thing I notice is that my custom explicitly-ipv4-only /etc/hosts entry resolves to an IPv6 address, breaking things. #FuckSystemd
It has been 0 days since we last said #FuckSystemd
It is #FuckSystemd o'clock once again

@jmaris @thechildofroth @kde the problem is exactly that - most people who run linux do not want the wrongheaded windows design because of all the problems it comes with but are forced to because the distros adopted it not for the benefit of users. also its garbage and I curse every time it reminds me

#FuckSystemd

@dandylover1 @fastfinge No it doesnt.

In fact #FuckSystemd is at this point a mantra.

Woke up stupidly early for no good reason, so decided to defeat #systemd's idiotic networking bug once and for all. An hour later ... if anyone can think of a better way to make DHCP actually work on powerup than with `@reboot /sbin/dhclient en0wtf1` in crontab do please let me know, but without that, networking only works after a reboot. #debian #networking #SystemdIsShit #FuckSystemd