cshore d1b5a86809 [net] [multimedia]: Moved multimedia submenu to be part the the Multimedia package group, since that's what it's for.
git-svn-id: svn://svn.openwrt.org/openwrt/packages@26107 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-03-12 09:06:35 +00:00

28 lines
534 B
Bash

#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=50
BIN=gmediaserver
DEFAULT=/etc/default/$BIN
RUN_D=/var/run
PID_F=$RUN_D/$BIN.pid
start() {
mkdir -p $RUN_D
config_load gmediaserver
config_foreach start_service gmediaserver
}
start_service() {
local cfg="$1"
config_get content_directory "$cfg" content_directory
config_get interface "$cfg" interface
$BIN --background --interface=${interface:-br-lan} --pid-file=$PID_F ${content_directory:-/tmp}
}
stop() {
[ -f $PID_F ] && kill $(cat $PID_F)
}