second initial commit
This commit is contained in:
35
init.d/mastodon-sidekiq
Normal file
35
init.d/mastodon-sidekiq
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/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 $?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user