Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: VDR pidfile



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alle 20:17, mercoledì 23 giugno 2004, Roland Behme ha scritto:
> Hi Darren,
>
> > Assuming Debian:
> >   $ man 8 start-stop-daemon
>
> It's Gentoo.
>
> I tried start-stop-daemon, but it does not seem to be the solution:

Maybe this script can help you, i haven't test it:
- ------------------------------------------------------------------------------------------------------------------
#!/sbin/runscript
# Copyright 2003 Martin Hierling <mad@cc.fh-lippe.de>
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-de/ebuilds/media-video/vdr/files/rc.vdr,v 
1.1.1.1 2004/05/27 17:49:37 dertobi123 Exp $

start() {
	vdrpots="-P"xine -r" #vdr options
	ebegin "Starting $(vdr -V)"
	su vdr -c "/usr/bin/vdr --daemon ${vdropts}" #i launch vdr with vdr user
	eend $? "Failed to start vdr."
}

stop() {
	ebegin "Stopping $(vdr -V)"
	start-stop-daemon --stop --quiet --retry 15 --exec /usr/bin/vdr
	eend $? "Failed to stop vdr."
}

fullrestart() {
	ebegin "Fully restarting $(vdr -V) and DVB drivers"
	/etc/init.d/vdr stop
	/etc/init.d/vdr zap
	sleep 5
	/bin/pidof /usr/bin/vdr && /bin/killall -9 vdr
	sleep 5
	/etc/init.d/vdr start
}
- ------------------------------------------------------------------------------------------------------------------

This is an extract of vdr init script from ebuild file that you get here:
http://www.gentoo.de/viewcvs/gentoo-de/ebuilds/media-video/vdr/

I hope it help you...

- -- 
Denis Grilli - denis@denisgrilli.it
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA2mleGYbI0P2MWrURApLUAJ0Yd0PGn9ALsrKgRUYr3CHblJmQ5QCdHq+N
VFqU3PeipLpfTzVzTvlKoAQ=
=DULa
-----END PGP SIGNATURE-----




Home | Main Index | Thread Index