From: Georg W. L. <ge...@gm...> - 2007-08-30 11:00:17
|
Hi Francisco, very thanks. I will try to integrate the scripts at the next debs. Georg Am Donnerstag, den 30.08.2007, 10:57 +0200 schrieb Francisco Eduardo =C3=81lvarez Solano: > I'm configuring a fresh install of Freevo based on Ubuntu Feisty Fawn, > server. After installing Freevo form apt sources, I've disabled the > standard init scripts that come with the distribution and I've written > an upstart script instead.=20 >=20 > You should remove the freevo service, and add the file >=20 > /etc/event.d/freevo: >=20 > ########################### > start on runlevel > 2 =20 > = =20 > stop on runlevel > 0 =20 > stop on runlevel > 1 =20 > stop on runlevel > 6 =20 > = =20 > respawn # This ensures that freevo will be restarted if it crashed > exec freevo -fs > ############################# >=20 > If you don't want freevo to run as root, you can write a script > instead of the 'exec' stanza:=20 > script = =20 >=20 > LANG=3Des_ES.UTF-8 = =20 > USER=3Dcasa > =20 >=20 > HOME=3D/casa/ = =20 >=20 > FREEVO=3D/usr/bin/freevo = =20 > export LANG USER HOME > FREEVO =20 > = =20 > exec sudo -H -u casa freevo > -fs =20 > end script >=20 >=20 > Now it is very easy to add other scripts to launch the record server > or the encoding server: >=20 > /etc/event.d/recordserver: >=20 > ##################################### > start on runlevel 2 >=20 > stop on runlevel 0 > stop on runlevel 1 > stop on runlevel 6 >=20 > respawn > exec freevo recordserver start > ###################################### >=20 >=20 > You can even start services before or after another one. Here is my > script to download the epg data from internet: >=20 > /etc/event.d/epg: >=20 > ########################################## > start on started freevo # Or 'start on started recordserver' > = =20 > stop on runlevel > 0 =20 > stop on runlevel > 1 =20 > stop on runlevel > 6 =20 > = =20 > exec /etc/freevo/scripts/epg.sh > ############################################# >=20 >=20 > And here it is /etc/freevo/scripts/epg.sh: >=20 > ######################################### > #!/bin/sh = =20 > = =20 > DIR=3D"/var/cache/freevo/" = =20 > GUIDE=3D"$DIR/TV.xml" = =20 > TMP=3D"$DIR/tmp" = =20 > = =20 > touch -t `date +%m%d`0000 > $TMP =20 > if [ $GUIDE -ot $TMP ] # If TV.xml is outdated > then = =20 > while [ 1 ] # we wait till internet is available >=20 > do = =20 > ping -c 1 www.elpais.es && > break =20 >=20 > done = =20 > freevo tv_grab # and download it > fi = =20 > rm $TMP > ############################################=20 >=20 >=20 > Hope this will be of interest. >=20 > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ Freevo-users mailing list= Fre...@li... https://lists.sourceforge.net/lists/lis= tinfo/freevo-users |