]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
minidlna: Add initscript and all the other fancy install stuff.
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 24 Aug 2012 13:37:36 +0000 (15:37 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 24 Aug 2012 13:37:36 +0000 (15:37 +0200)
config/rootfiles/common/armv5tel/initscripts
config/rootfiles/common/i586/initscripts
config/rootfiles/packages/minidlna
src/initscripts/init.d/minidlna [new file with mode: 0755]
src/paks/minidlna/install.sh [new file with mode: 0644]
src/paks/minidlna/uninstall.sh [new file with mode: 0644]
src/paks/minidlna/update.sh [new file with mode: 0644]

index eaa6352d74c6b5a41bb54b892e10d6d7ba9e5381..c23416692c08c73017adb4ee2f8c58a5098d16bd 100644 (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
index 882628afd82fc2bdaf6acccb3293debe91e3c461..63cd27448d99517a9da87a59da5ebc0bf4f31783 100644 (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
index e53330e9232d8485bba69dfee86d166f0ce480bc..c30e30b406cd31fbdd5260b4b901ccf69f6b413c 100644 (file)
@@ -1,2 +1,3 @@
+etc/rc.d/init.d/minidlna
 etc/minidlna.conf
 usr/sbin/minidlna
diff --git a/src/initscripts/init.d/minidlna b/src/initscripts/init.d/minidlna
new file mode 100755 (executable)
index 0000000..6823067
--- /dev/null
@@ -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
diff --git a/src/paks/minidlna/install.sh b/src/paks/minidlna/install.sh
new file mode 100644 (file)
index 0000000..5080157
--- /dev/null
@@ -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
diff --git a/src/paks/minidlna/uninstall.sh b/src/paks/minidlna/uninstall.sh
new file mode 100644 (file)
index 0000000..bc59838
--- /dev/null
@@ -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
diff --git a/src/paks/minidlna/update.sh b/src/paks/minidlna/update.sh
new file mode 100644 (file)
index 0000000..d5e6116
--- /dev/null
@@ -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