minidlna: Add initscript and all the other fancy install stuff.

This commit is contained in:
Michael Tremer
2012-08-24 15:37:36 +02:00
parent 890f0b12f7
commit a53c3c2621
7 changed files with 135 additions and 0 deletions

View File

@@ -47,6 +47,7 @@ etc/rc.d/init.d/mISDN
#etc/rc.d/init.d/mediatomb
#etc/rc.d/init.d/messagebus
#etc/rc.d/init.d/miau
#etc/rc.d/init.d/minidlna
#etc/rc.d/init.d/miniupnpd
#etc/rc.d/init.d/mldonkey
etc/rc.d/init.d/modules

View File

@@ -48,6 +48,7 @@ etc/rc.d/init.d/mISDN
#etc/rc.d/init.d/mediatomb
#etc/rc.d/init.d/messagebus
#etc/rc.d/init.d/miau
#etc/rc.d/init.d/minidlna
#etc/rc.d/init.d/miniupnpd
#etc/rc.d/init.d/mldonkey
etc/rc.d/init.d/modules

View File

@@ -1,2 +1,3 @@
etc/rc.d/init.d/minidlna
etc/minidlna.conf
usr/sbin/minidlna

48
src/initscripts/init.d/minidlna Executable file
View File

@@ -0,0 +1,48 @@
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/minidlna
#
# Description : minidlna - UPNP/DLNA streaming server
#
# Authors : Michael Tremer <michael.tremer@ipfire.org>
#
# Version : 01.00
#
########################################################################
. /etc/sysconfig/rc
. ${rc_functions}
case "${1}" in
start)
boot_mesg "Starting minidlna..."
loadproc /usr/sbin/minidlna
;;
stop)
boot_mesg "Stopping minidlna..."
killproc /usr/sbin/minidlna
;;
reload)
boot_mesg "Reloading minidlna..."
reloadproc /usr/sbin/minidlna
;;
restart)
${0} stop
sleep 1
${0} start
;;
status)
statusproc /usr/sbin/minidlna
;;
*)
echo "Usage: ${0} {start|stop|reload|restart|status}"
exit 1
;;
esac
# End $rc_base/init.d/minidlna

View File

@@ -0,0 +1,32 @@
#!/bin/bash
############################################################################
# #
# This file is part of the IPFire Firewall. #
# #
# IPFire is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# IPFire is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
# #
############################################################################
#
. /opt/pakfire/lib/functions.sh
extract_files
[ -d /var/mp3 ] || ( mkdir /var/mp3 && chown nobody.nobody /var/mp3 )
start_service ${NAME}
ln -svf ../init.d/minidlna /etc/rc.d/rc0.d/K00minidlna
ln -svf ../init.d/minidlna /etc/rc.d/rc3.d/S99minidlna
ln -svf ../init.d/minidlna /etc/rc.d/rc6.d/K00minidlna

View File

@@ -0,0 +1,27 @@
#!/bin/bash
############################################################################
# #
# This file is part of the IPFire Firewall. #
# #
# IPFire is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# IPFire is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
# #
############################################################################
#
. /opt/pakfire/lib/functions.sh
stop_service ${NAME}
remove_files
rm -rf /etc/rc.d/rc*.d/*minidlna

View File

@@ -0,0 +1,25 @@
#!/bin/bash
############################################################################
# #
# This file is part of the IPFire Firewall. #
# #
# IPFire is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# IPFire is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
# #
############################################################################
#
./uninstall.sh
./install.sh