second initial commit
This commit is contained in:
37
init.d/mastodon-web
Normal file
37
init.d/mastodon-web
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
. /etc/conf.d/mastodon
|
||||
|
||||
name="Mastodon Web Service"
|
||||
pidfile="${root}/web.pid"
|
||||
|
||||
depend() {
|
||||
use net
|
||||
need mastodon
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting Mastodon web workers"
|
||||
|
||||
start-stop-daemon --start \
|
||||
--chdir "${INSTALLROOT}" \
|
||||
--user="${USER}" \
|
||||
--pidfile="${pidfile}" \
|
||||
-3 logger \
|
||||
-4 logger \
|
||||
-b -m \
|
||||
--exec /usr/bin/env -- RAILS_ENV=production PORT=${WEB_PORT}
|
||||
MAX_THREADS=${WEB_MAX_THREADS} WEB_CONCURRENCY=${WEB_CONCURRE
|
||||
BIND=${WEB_BIND} bundle \
|
||||
exec puma -C config/puma.rb
|
||||
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping Mastodon web workers"
|
||||
start-stop-daemon --stop \
|
||||
--pidfile=${pidfile} \
|
||||
eend $?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user