diff options
author | Matthias Schwarzott <zzam@gentoo.org> | 2006-11-01 11:32:51 +0000 |
---|---|---|
committer | Matthias Schwarzott <zzam@gentoo.org> | 2006-11-01 11:32:51 +0000 |
commit | c9b1364a23739bbaa3d765160111b5c4f1cd7c01 (patch) | |
tree | c032e234112b0c767d4737db94b3fc0d076906ae /net-www/vdradmin-am/files/vdradmin-2 | |
parent | media-plugins/vdr-epgsearch: Removed older version. (diff) | |
download | testing-c9b1364a23739bbaa3d765160111b5c4f1cd7c01.tar.gz testing-c9b1364a23739bbaa3d765160111b5c4f1cd7c01.tar.bz2 testing-c9b1364a23739bbaa3d765160111b5c4f1cd7c01.zip |
vdradmin-am/files/vdradmin-2: Create user vdradmin to run under instead of root.
svn path=/testing/; revision=62
Diffstat (limited to 'net-www/vdradmin-am/files/vdradmin-2')
-rw-r--r-- | net-www/vdradmin-am/files/vdradmin-2 | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/net-www/vdradmin-am/files/vdradmin-2 b/net-www/vdradmin-am/files/vdradmin-2 new file mode 100644 index 0000000..13cbbef --- /dev/null +++ b/net-www/vdradmin-am/files/vdradmin-2 @@ -0,0 +1,35 @@ +#!/sbin/runscript +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/net-www/vdradmin-am/files/vdradmin,v 1.1 2006/07/14 15:16:36 hd_brummy Exp $ + +depend() { + need vdr +} + +set_charset() { + local capfile=/usr/share/vdr/capabilities.sh + [[ -e ${capfile} ]] && source ${capfile} + if [[ "${CAP_UTF8}" == "1" || "${VDR_CAN_HANDLE_UTF8}" == "yes" ]]; then + # do not clean out utf8 + : + else + l=$(locale | sed -e 's/\.[uU][tT][fF]\(-\)\?8//' -e 's/^/export /') + eval $l + fi +} + +start() { + ebegin "Starting vdradmin-am" + + : ${VDRADMIN_USER:=vdr} + set_charset + start-stop-daemon --start --background --chuid ${VDRADMIN_USER} --exec /usr/bin/vdradmind.pl + eend $? +} + +stop() { + ebegin "Stopping vdradmin-am" + start-stop-daemon --stop --quiet --pidfile /var/run/vdradmind.pid + eend $? +} |