Changeset 20318


Ignore:
Timestamp:
2010-03-20T13:13:01+01:00 (8 years ago)
Author:
florian
Message:

[package] start mpd normally, patch from Stefan Monnier

Location:
packages/sound/mpd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/sound/mpd/Makefile

    r19719 r20318  
    1010PKG_NAME:=mpd 
    1111PKG_VERSION:=0.15.8 
    12 PKG_RELEASE:=1 
     12PKG_RELEASE:=2 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 
  • packages/sound/mpd/files/mpd.init

    r18508 r20318  
    55start() { 
    66        #create mpd directories 
    7         md=`grep music_directory /etc/mpd.conf | cut -d "\"" -f 2 | sed "s/~/\/root/g"` 
    8         if [ ! -d $md ]; then 
    9                 mkdir -p $md 
    10         fi 
    117        pld=`grep playlist_directory /etc/mpd.conf | cut -d "\"" -f 2 | sed "s/~/\/root/g"` 
    128        if [ ! -d $pld ]; then 
    139                mkdir -p $pld 
    1410        fi 
    15         #create mpd db 
    16         /usr/bin/mpd --stdout --create-db 
    17  
    18         #optional export for mpc 
    19         #export MPD_HOST=127.0.0.1 
     11        # Set the initial volume to something manageable 
     12        amixer set PCM 40 
    2013 
    2114        #start mpd 
    22         /usr/bin/mpd 
    23  
    24         #generate playlist and start to play 
    25         /usr/bin/mpc listall | /usr/bin/mpc add - 
    26         /usr/bin/mpc play 
    27         /usr/bin/mpc repeat 
     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 
    2822} 
    2923 
Note: See TracChangeset for help on using the changeset viewer.