summaryrefslogtreecommitdiff
path: root/dev-ruby/rubygems/files/init.d-gem_server2
blob: 213d88b0bd6e6272796f78ca971e35d6181cf10f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/sbin/openrc-run
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

PID=/var/run/gem_server.pid

depend() {
	need localmount net
}

start() {
	ebegin "Starting gem_server"
	start-stop-daemon --start --user nobody --quiet --background \
		--make-pidfile --pidfile ${PID} --exec /usr/bin/ruby -- \
		/usr/bin/gem server ${GEM_SERVER_OPTS}
	eend ${?}
}

stop() {
	ebegin "Stopping gem_server"
	start-stop-daemon --stop --pidfile ${PID}
	eend ${?}
}