mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
minidlna: Add initscript and all the other fancy install stuff.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
etc/rc.d/init.d/minidlna
|
||||
etc/minidlna.conf
|
||||
usr/sbin/minidlna
|
||||
|
||||
48
src/initscripts/init.d/minidlna
Executable file
48
src/initscripts/init.d/minidlna
Executable 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
|
||||
32
src/paks/minidlna/install.sh
Normal file
32
src/paks/minidlna/install.sh
Normal 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
|
||||
27
src/paks/minidlna/uninstall.sh
Normal file
27
src/paks/minidlna/uninstall.sh
Normal 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
|
||||
25
src/paks/minidlna/update.sh
Normal file
25
src/paks/minidlna/update.sh
Normal 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
|
||||
Reference in New Issue
Block a user