summaryrefslogtreecommitdiff
blob: 1d96de7c56dbbd5e1b3ec7e1e18f185ae440e69c (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
29
30
31
32
33
34
#!/sbin/runscript
#
# Startup script for the edna audio server 
#
# description: edna is a mini mp3/ogg webserver
# processname: python
# pidfile: /var/run/ednad.pid
# config: /etc/edna/edna.conf

export PYTHONPATH=/usr/lib/edna
EDNA=/usr/bin/edna
EDNACONF=/etc/edna/edna.conf
PIDFILE=/var/run/edna.pid

depend() {
        use net
	need local
}

start() {
    ebegin "Starting edna mp3 server"
    start-stop-daemon --quiet --pidfile $PIDFILE
    $EDNA --daemon $EDNACONF
    eend $? "Failed to start edna"
}

stop() {
    ebegin "Stopping edna mp3 server"
    start-stop-daemon --stop -o --quiet --pidfile $PIDFILE
    local ret=$?
    eend ${ret} "Failed to stop edna"
    rm -f $PIDFILE
    return ${ret}
}