summaryrefslogtreecommitdiff
blob: 0667fedb78a50e459070b5bd778d3abb87b20292 (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
25
26
27
28
#!/sbin/openrc-run

NAME="mogilefsd"
BINARY="/usr/bin/mogilefsd"
MOGILE_UID="mogile"
MOGILE_GID="mogile"

depend() {
	use net mysql postgresql
	after mysql postgresql
}

start() {
	install -o $MOGILE_UID -g $MOGILE_GID -d $(dirname $PIDFILE)
	ebegin "Starting $NAME"
	start-stop-daemon --chuid ${MOGILE_UID}:${MOGILE_GID} --start \
		--pidfile ${PIDFILE} --exec ${BINARY} \
		-- ${MOGILEFSD_OPTS}
	eend $?
}

stop() {
	ebegin "Stopping $NAME"
	start-stop-daemon --stop --quiet --pidfile="${PIDFILE}"
	eend $?
}

# vim: ft=gentoo-init-d: