archives/mastodon: new aport

This commit is contained in:
Antoine Martin 2024-08-09 22:27:59 -04:00
parent 9f6c072b60
commit e7773e8def
Signed by: ayakael
GPG key ID: D62A472A4AA7D541
10 changed files with 445 additions and 0 deletions

View file

@ -0,0 +1,41 @@
#!/sbin/openrc-run
name="Mastodon"
description="Meta script for starting/stopping all the Mastodon components"
subservices="mastodon.sidekiq mastodon.streaming mastodon.web"
depend() {
need redis postgresql
use net
}
start() {
local ret=0
ebegin "Starting all Mastodon components"
local svc; for svc in $subservices; do
service $svc start || ret=1
done
eend $ret
}
stop() {
local ret=0
ebegin "Stopping all Mastodon components"
local svc; for svc in $subservices; do
service $svc stop || ret=1
done
eend $ret
}
status() {
local ret=0
local svc; for svc in $subservices; do
echo "$svc:"
service $svc status || ret=1
done
eend $ret
}