archives/mastodon: new aport
This commit is contained in:
parent
9f6c072b60
commit
e7773e8def
10 changed files with 445 additions and 0 deletions
29
archives/mastodon/mastodon.web.initd
Normal file
29
archives/mastodon/mastodon.web.initd
Normal file
|
@ -0,0 +1,29 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
name="Mastodon Web Service"
|
||||
root="/usr/lib/bundles/mastodon"
|
||||
pidfile="/run/mastodon-web.pid"
|
||||
logfile="/var/log/mastodon/web.log"
|
||||
|
||||
depend() {
|
||||
use net
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting Mastodon web workers"
|
||||
cd $root
|
||||
start-stop-daemon --start --background \
|
||||
--chdir "${root}" \
|
||||
--user="mastodon" \
|
||||
--pidfile="${pidfile}" --make-pidfile \
|
||||
--stdout="${logfile}" --stderr="${logfile}" \
|
||||
--exec /usr/bin/env -- RAILS_ENV=production PORT=3000 bundle exec puma -C config/puma.rb
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping Mastodon web workers"
|
||||
start-stop-daemon --stop \
|
||||
--pidfile=${pidfile} \
|
||||
eend $?
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue