summaryrefslogtreecommitdiff
path: root/dev-ros/roslaunch/files/roscore.initd
blob: d05c3fe98a76886f08ad98cfc9724b16225886c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/sbin/openrc-run
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

depend() {
	after net
}

start() {
	ebegin "Starting ROS server roscore"
	start-stop-daemon --start \
		--user ros --group ros \
		-m --pidfile /var/run/roscore.pid \
		--exec "/usr/bin/roscore" --background
	eend $? "Failed to start roscore"
}

stop() {
	ebegin "Stopping roscore"
	start-stop-daemon --stop \
		--pidfile /var/run/roscore.pid \
		--exec "/usr/bin/roscore"
	eend $? "Failed to stop roscore"
}