From 1cba0ad3baedc883176e19f3226ea565ab2ba720 Mon Sep 17 00:00:00 2001 From: kueller Date: Thu, 9 Sep 2010 11:16:40 +0000 Subject: [PATCH] =?UTF-8?q?Upstart=20und=20installscripten=20f=C3=BCr=20me?= =?UTF-8?q?diatomb?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_mediatomb@5822 504e572c-2e33-0410-9681-be2bf7408885 --- etc/init/mediatomb.conf | 12 ++++++++++++ tmp/postinstall | 8 ++++++++ tmp/postremove | 8 ++++++++ 3 files changed, 28 insertions(+) create mode 100644 etc/init/mediatomb.conf create mode 100644 tmp/postinstall create mode 100644 tmp/postremove diff --git a/etc/init/mediatomb.conf b/etc/init/mediatomb.conf new file mode 100644 index 0000000..f59415c --- /dev/null +++ b/etc/init/mediatomb.conf @@ -0,0 +1,12 @@ +description "Samba file Deamon" +author "Harald Kueller " +version 1.0 +emits none special + +start on (runlevel [2345] and (started autofs-nis)) +stop on runlevel [016] + +console none + +respawn +exec /opt/mediatomb/bin/mediatomb --user dlna --group music --home /var/dlna --port 49152 diff --git a/tmp/postinstall b/tmp/postinstall new file mode 100644 index 0000000..732610a --- /dev/null +++ b/tmp/postinstall @@ -0,0 +1,8 @@ +#!/bin/bash + +if ! getent group dlna >/dev/null; then + groupadd -g 34 dlna +fi +if ! getent passwd dlna >/dev/null; then + useradd -u 56 -g dlna -d /var/dlna -s /bin/false dlna +fi diff --git a/tmp/postremove b/tmp/postremove new file mode 100644 index 0000000..708c0e1 --- /dev/null +++ b/tmp/postremove @@ -0,0 +1,8 @@ +#!/bin/bash + +if getent passwd dlna >/dev/null; then + userdel dlna +fi +if getent group dlna >/dev/null; then + groupdel dlna +fi