Changeset 29058


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

packages/dmapd: use new service functions, create dmapd user & group and required directories

Location:
packages/net/dmapd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/net/dmapd/Makefile

    r28531 r29058  
    1010PKG_NAME:=dmapd 
    1111PKG_VERSION:=0.0.43 
    12 PKG_RELEASE:=2 
     12PKG_RELEASE:=3 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
  • packages/net/dmapd/files/dmapd.init

    r26421 r29058  
    11#!/bin/sh /etc/rc.common 
    2 # Copyright (C) 2009-2010 OpenWrt.org 
     2# Copyright (C) 2009-2011 OpenWrt.org 
    33 
    44START=60 
    55 
    66start() { 
    7         mkdir -p /var/cache/dmapd/ 
    8         mkdir -p /var/run/dmapd/ 
    9         mkdir -p /var/lock/subsys/ 
     7        user_exists dmapd 56 || user_add dmapd 56 
     8        group_exists dmapd 56 || group_add dmapd 56 
     9        [ -d /var/run/dmapd ] || { 
     10                mkdir -m 0755 -p /var/run/dmapd 
     11                chown dmapd:dmapd /var/run/dmapd 
     12        } 
     13        [ -d /var/db/dmapd/DAAP ] || { 
     14                mkdir -m 0755 -p /var/db/dmapd/DAAP 
     15                chown dmapd:dmapd /var/db/dmapd/DAAP 
     16        } 
     17        mkdir -m 0755 -p /var/lock/subsys 
     18        mkdir -m 0755 -p /var/media/music 
     19        mkdir -m 0755 -p /var/media/pictures 
    1020 
    11         DMAPD_DB_MODULE=bdb /usr/sbin/dmapd --vips-disc-threshold 64k 
     21        DMAPD_DB_MODULE=bdb \ 
     22        service_start /usr/sbin/dmapd -m /var/media/music -p /var/media/pictures --vips-disc-threshold 64k 
    1223} 
    1324 
    1425stop() { 
    15         killall dmapd 2> /dev/null 
     26        service_stop /usr/sbin/dmapd 
    1627} 
Note: See TracChangeset for help on using the changeset viewer.