2023-01-11 13:36:09 +00:00
|
|
|
#!/sbin/openrc-run
|
|
|
|
|
|
|
|
name="GitLab"
|
|
|
|
description="Meta script for starting/stopping all the GitLab components"
|
|
|
|
|
|
|
|
: ${mailroom_enabled:="no"}
|
|
|
|
: ${pages_enabled:="yes"}
|
|
|
|
|
|
|
|
subservices="gitlab.rails gitlab.gitaly gitlab.sidekiq gitlab.workhorse"
|
|
|
|
if yesno "$mailroom_enabled"; then
|
|
|
|
subservices="$subservices gitlab.mailroom"
|
|
|
|
fi
|
|
|
|
if yesno "$pages_enabled" && [ -e /etc/init.d/gitlab.pages ]; then
|
|
|
|
subservices="$subservices gitlab.pages"
|
|
|
|
fi
|
|
|
|
|
|
|
|
depend() {
|
2024-07-11 01:39:00 +00:00
|
|
|
need redis postgresql
|
2023-01-11 13:36:09 +00:00
|
|
|
use net
|
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
|
|
|
local ret=0
|
|
|
|
|
|
|
|
ebegin "Starting all GitLab components"
|
|
|
|
local svc; for svc in $subservices; do
|
|
|
|
service $svc start || ret=1
|
|
|
|
done
|
|
|
|
eend $ret
|
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
local ret=0
|
|
|
|
|
|
|
|
ebegin "Stopping all GitLab 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
|
|
|
|
}
|