source: packages/sound/mpd/files/mpd.init @ 20318

Last change on this file since 20318 was 20318, checked in by florian, 6 years ago

[package] start mpd normally, patch from Stefan Monnier

File size: 593 bytes
Line 
1#!/bin/sh /etc/rc.common
2# Copyright (C) 2007 OpenWrt.org
3START=93
4
5start() {
6        #create mpd directories
7        pld=`grep playlist_directory /etc/mpd.conf | cut -d "\"" -f 2 | sed "s/~/\/root/g"`
8        if [ ! -d $pld ]; then
9                mkdir -p $pld
10        fi
11        # Set the initial volume to something manageable
12        amixer set PCM 40
13
14        #start mpd
15        if [ -x /bin/nice ]; then
16                # This has real-time constraints, so let's at least tell the OS
17                # that this should have higher priority to avoid skipping
18                # when doing other things in the background.
19                nice="nice -n -10"
20        fi
21        $nice /usr/bin/mpd
22}
23
24stop() {
25        killall mpd
26}
Note: See TracBrowser for help on using the repository browser.