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