blob: 6c7989d89d66bc985a373f5d18a7376f06af1567 (
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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
need net
# In order to properly support this (need vs use), we would have to
# parse ${MEDIATOMB_CONFIG} and see if mysql is enabled and if it is
# pointing to the local system. #368409
use mysql
}
start() {
ebegin "Starting MediaTomb"
start-stop-daemon --start --quiet --exec /usr/bin/mediatomb \
--pidfile ${MEDIATOMB_PIDFILE} -- --daemon \
--pidfile ${MEDIATOMB_PIDFILE} --user ${MEDIATOMB_USER} \
--group ${MEDIATOMB_GROUP} --logfile ${MEDIATOMB_LOGFILE} \
--config ${MEDIATOMB_CONFIG} --port ${MEDIATOMB_PORT} \
${MEDIATOMB_OPTIONS}
eend $?
}
stop () {
ebegin "Stopping MediaTomb"
start-stop-daemon --stop --retry 10 --quiet --pidfile ${MEDIATOMB_PIDFILE}
eend $?
}
|