2023-06-22 03:36:51 +00:00
|
|
|
#!/sbin/openrc-run
|
|
|
|
|
|
|
|
name="Mastodon"
|
|
|
|
description="Meta script for starting/stopping all the Mastodon components"
|
|
|
|
|
|
|
|
subservices="mastodon.sidekiq mastodon.streaming mastodon.web"
|
|
|
|
|
|
|
|
depend() {
|
2024-07-11 01:42:04 +00:00
|
|
|
need redis postgresql
|
2023-06-22 03:36:51 +00:00
|
|
|
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
|
|
|
|
}
|