summaryrefslogtreecommitdiffstats
path: root/gentoo_initscript
blob: abb87d9cc1a88e4c99688a219d9bf7c7a218fbae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/sbin/runscript

depend() {
	need net
	use dns
}

start() {
	ebegin "Starting pica-node"
	# Ensure that we run from a readable working dir, and that we do not
	# lock filesystems when being run from such a location.
	cd /
	start-stop-daemon --start --quiet --background --make-pidfile \
		--pidfile /var/run/pica-node.pid --exec /usr/bin/pica-node \
		--stdout /var/log/pica-node.log --stderr /var/log/pica-node.err \
		--user ${PICANODE_USER:-pica-node}  -- \
		 ${PICANODE_OPTS:--v}
	eend $?
}

stop() {
	ebegin "Stopping pica-node"
	start-stop-daemon --stop --quiet --pidfile /var/run/pica-node.pid
	eend $?
}