#!/sbin/openrc-run

name="Loomio"
description="Meta script for starting/stopping all the Loomio components"
subservices="loomio.sidekiq loomio.vue"

depend() {
	use net
}

start() {
	local ret=0

	ebegin "Starting all Loomio components"
	local svc; for svc in $subservices; do
		service $svc start || ret=1
	done
	eend $ret
}

stop() {
	local ret=0

	ebegin "Stopping all Loomio 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
}