Changeset 29080


Ignore:
Timestamp:
2011-11-13T23:16:27+01:00 (6 years ago)
Author:
nico
Message:

packages/mpd: use new service functions

Location:
packages/sound/mpd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/sound/mpd/Makefile

    r28524 r29080  
    1010PKG_NAME:=mpd 
    1111PKG_VERSION:=0.16.5 
    12 PKG_RELEASE:=1 
     12PKG_RELEASE:=2 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 
     
    194194        $(INSTALL_DIR) $(1)/etc 
    195195        $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf 
     196        $(INSTALL_DIR) $(1)/etc/init.d 
     197        $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd 
    196198endef 
    197199 
     
    200202        $(INSTALL_DIR) $(1)/etc/avahi/services 
    201203        $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/ 
    202         $(INSTALL_DIR) $(1)/etc/init.d 
    203         $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd 
    204204endef 
    205205 
  • packages/sound/mpd/files/mpd.init

    r21860 r29080  
    11#!/bin/sh /etc/rc.common 
    2 # Copyright (C) 2007-2010 OpenWrt.org 
     2# Copyright (C) 2007-2011 OpenWrt.org 
     3 
    34START=93 
    45 
     
    78        pld=`grep ^playlist_directory /etc/mpd.conf | cut -d "\"" -f 2 | sed "s/~/\/root/g"` 
    89        if [ ! -d $pld ]; then 
    9                 mkdir -p $pld 
     10                mkdir -m 0755 -p $pld 
    1011        fi 
     12 
    1113        # Set the initial volume to something manageable 
    12         amixer set PCM 40 
     14        [ -x /usr/bin/amixer ] && /usr/bin/amixer set PCM 40 
    1315 
    14         #start mpd 
    1516        if [ -x /bin/nice ]; then 
    1617                # This has real-time constraints, so let's at least tell the OS 
    1718                # that this should have higher priority to avoid skipping 
    1819                # when doing other things in the background. 
    19                 nice="nice -n -10" 
     20                nice -n -10 
    2021        fi 
    21         $nice /usr/bin/mpd 
     22 
     23        service_start /usr/bin/mpd 
    2224} 
    2325 
    2426stop() { 
    25         killall mpd 
     27        service_stop /usr/bin/mpd 
    2628} 
Note: See TracChangeset for help on using the changeset viewer.