Files
Mastodon-openrc/init.d/mastodon-sidekiq
2026-04-12 15:46:17 -05:00

36 lines
769 B
Plaintext

#!/sbin/openrc-run
. /etc/conf.d/mastodon
name="Mastodon background workers Service"
pidfile="${INSTALLROOT}/worker.pid"
depend() {
use net
need mastodon
}
start() {
ebegin "Starting Mastodon background workers"
start-stop-daemon --start \
--chdir "${INSTALLROOT}" \
--user="${USER}" \
--pidfile="${pidfile}" \
-3 logger \
-4 logger \
-b -m \
--exec /usr/bin/env -- RAILS_ENV=production DB_POOL=${DB_POOL} \
bundle exec sidekiq -c ${SIDEKIQ_WORKERS} -q default,8 -q scheduler,1 -q mailers,1 -q push,6 -q ingress,4 -q pull,1 -q fasp
eend $?
}
stop() {
ebegin "Stopping Mastodon background workers"
start-stop-daemon --stop \
--pidfile=${pidfile} \
eend $?
}