|
From: <me...@us...> - 2007-08-23 19:24:10
|
Revision: 830
http://gmyth.svn.sourceforge.net/gmyth/?rev=830&view=rev
Author: melunko
Date: 2007-08-23 12:24:11 -0700 (Thu, 23 Aug 2007)
Log Message:
-----------
fixed config file to expand dir
Modified Paths:
--------------
trunk/gmyth-stream/server/0.3/lib/gmsconfig.py
trunk/gmyth-stream/server/0.3/lib/request_handler.py
trunk/gmyth-stream/server/0.3/server.conf
Modified: trunk/gmyth-stream/server/0.3/lib/gmsconfig.py
===================================================================
--- trunk/gmyth-stream/server/0.3/lib/gmsconfig.py 2007-08-23 13:24:46 UTC (rev 829)
+++ trunk/gmyth-stream/server/0.3/lib/gmsconfig.py 2007-08-23 19:24:11 UTC (rev 830)
@@ -16,12 +16,11 @@
__CONFIG_FILE__ = "server.conf"
__CONFIG_DIRS__ = [os.path.join (os.path.expanduser("~"), ".gms"), \
os.path.join ("/", "etc", "gms"), \
- "."]
+ "."]
def __init__(self):
for path in self.__CONFIG_DIRS__:
file_name = os.path.join (path, self.__CONFIG_FILE__)
- print "test config file: %s" % file_name
if os.path.exists (file_name):
fp = open (file_name, "r")
self.config.readfp (fp)
@@ -30,7 +29,7 @@
def get_transcoded_location (self):
try:
- return self.config.get("PATHS", "transcoded")
+ return os.path.realpath (self.config.get("PATHS", "transcoded"))
except:
return None
# get_transcoded_location()
Modified: trunk/gmyth-stream/server/0.3/lib/request_handler.py
===================================================================
--- trunk/gmyth-stream/server/0.3/lib/request_handler.py 2007-08-23 13:24:46 UTC (rev 829)
+++ trunk/gmyth-stream/server/0.3/lib/request_handler.py 2007-08-23 19:24:11 UTC (rev 830)
@@ -355,8 +355,12 @@
# serve_file_info()
def serve_stream(self, body):
- filename = self.query.get("file", None)[0]
+ args = self.query.get("file", None)
+ if not args:
+ self.send_error(404, "File not found")
+ return
+ filename = args[0];
if not filename:
self.send_error(404, "File not found")
return
Modified: trunk/gmyth-stream/server/0.3/server.conf
===================================================================
--- trunk/gmyth-stream/server/0.3/server.conf 2007-08-23 13:24:46 UTC (rev 829)
+++ trunk/gmyth-stream/server/0.3/server.conf 2007-08-23 19:24:11 UTC (rev 830)
@@ -1,2 +1,2 @@
[PATHS]
-transcoded=.transcoded
+transcoded=./.transcoded
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mo...@us...> - 2007-08-28 07:30:17
|
Revision: 834
http://gmyth.svn.sourceforge.net/gmyth/?rev=834&view=rev
Author: morphbr
Date: 2007-08-28 00:30:10 -0700 (Tue, 28 Aug 2007)
Log Message:
-----------
- Bug fix
Modified Paths:
--------------
trunk/gmyth-stream/server/0.3/lib/request_handler.py
trunk/gmyth-stream/server/0.3/plugins/transcoders/mencoder.py
Modified: trunk/gmyth-stream/server/0.3/lib/request_handler.py
===================================================================
--- trunk/gmyth-stream/server/0.3/lib/request_handler.py 2007-08-28 07:16:13 UTC (rev 833)
+++ trunk/gmyth-stream/server/0.3/lib/request_handler.py 2007-08-28 07:30:10 UTC (rev 834)
@@ -360,13 +360,14 @@
self.send_error(404, "File not found")
return
- filename = args[0];
+ filename = args[0];
if not filename:
self.send_error(404, "File not found")
return
#Only stream files on .transcode dir
- filename = os.path.join (utils.config.get_transcoded_location(), os.path.basename(filename))
+ filename = os.path.join (utils.config.get_transcoded_location(),
+ os.path.basename(filename))
self.log.error("Stream file: %s" % filename)
if not os.path.exists (filename):
self.send_error(404, "File not found")
@@ -377,7 +378,6 @@
self.send_header("Content-Type", mimetypes.guess_type(filename)[0])
self.send_header("Cache-Control","no-cache")
self.send_header("Content-Length", size)
- #self.send_header("Connection", "close")
self.end_headers()
media = open(filename)
@@ -429,7 +429,6 @@
if (obj.name == "gmencoder"):
self.send_header("Transfer-Encoding", "chunked")
- #self.send_header("Connection", "close")
self.end_headers()
if body:
Modified: trunk/gmyth-stream/server/0.3/plugins/transcoders/mencoder.py
===================================================================
--- trunk/gmyth-stream/server/0.3/plugins/transcoders/mencoder.py 2007-08-28 07:16:13 UTC (rev 833)
+++ trunk/gmyth-stream/server/0.3/plugins/transcoders/mencoder.py 2007-08-28 07:30:10 UTC (rev 834)
@@ -91,7 +91,7 @@
if self.args["mux"] == "mpeg":
video += " -mpegopts format=%s" % self.args["format"]
- video += " -vf kerndint,scale=%s:%s" % (self.args["width"], self.args["height"])
+ video += " -vf scale=%s:%s" % (self.args["width"], self.args["height"])
return video
# _setup_video()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ren...@us...> - 2007-08-21 15:04:44
|
Revision: 821
http://gmyth.svn.sourceforge.net/gmyth/?rev=821&view=rev
Author: renatofilho
Date: 2007-08-21 08:04:44 -0700 (Tue, 21 Aug 2007)
Log Message:
-----------
created debian packages;\nImplemented server deamon;\n
Modified Paths:
--------------
trunk/gmyth-stream/server/0.3/gms.py
trunk/gmyth-stream/server/0.3/lib/file_handler.py
trunk/gmyth-stream/server/0.3/lib/request_handler.py
trunk/gmyth-stream/server/0.3/lib/utils.py
trunk/gmyth-stream/server/0.3/plugins/transcoders/gmencoder.py
Added Paths:
-----------
trunk/gmyth-stream/server/0.3/debian/
trunk/gmyth-stream/server/0.3/debian/changelog
trunk/gmyth-stream/server/0.3/debian/compat
trunk/gmyth-stream/server/0.3/debian/control
trunk/gmyth-stream/server/0.3/debian/copyright
trunk/gmyth-stream/server/0.3/debian/gms.install
trunk/gmyth-stream/server/0.3/debian/gms.postinst
trunk/gmyth-stream/server/0.3/debian/gms.postrm
trunk/gmyth-stream/server/0.3/debian/rules
trunk/gmyth-stream/server/0.3/lib/gmsconfig.py
trunk/gmyth-stream/server/0.3/setup.py
Added: trunk/gmyth-stream/server/0.3/debian/changelog
===================================================================
--- trunk/gmyth-stream/server/0.3/debian/changelog (rev 0)
+++ trunk/gmyth-stream/server/0.3/debian/changelog 2007-08-21 15:04:44 UTC (rev 821)
@@ -0,0 +1,6 @@
+gms (0.3-indt1) unstable; urgency=low
+
+ * First package
+
+ -- Renato Araujo Oliveira Filho <ren...@in...> Thu, 16 Aug 2007 14:55:00 -0300
+
Added: trunk/gmyth-stream/server/0.3/debian/compat
===================================================================
--- trunk/gmyth-stream/server/0.3/debian/compat (rev 0)
+++ trunk/gmyth-stream/server/0.3/debian/compat 2007-08-21 15:04:44 UTC (rev 821)
@@ -0,0 +1 @@
+5
Added: trunk/gmyth-stream/server/0.3/debian/control
===================================================================
--- trunk/gmyth-stream/server/0.3/debian/control (rev 0)
+++ trunk/gmyth-stream/server/0.3/debian/control 2007-08-21 15:04:44 UTC (rev 821)
@@ -0,0 +1,13 @@
+Source: gms
+Section: sound
+Priority: optional
+Maintainer: Renato Araujo Oliveira Filho <ren...@in...>
+Build-Depends: debhelper (>= 5.0.38), python-support (>= 0.5), python-central (>= 0.5)
+Standards-Version: 3.7.2
+
+Package: gms
+Architecture: any
+Depends: ${python:Depends}, libgstreamer0.10-0, gstreamer0.10-plugins-base, gstreamer0.10-plugins-good
+Recommends: gstreamer0.10-plugins-ugly
+Description: Media transcoder deamon
+ Homepage: http://gmyth.sourceforge.net/
Added: trunk/gmyth-stream/server/0.3/debian/copyright
===================================================================
--- trunk/gmyth-stream/server/0.3/debian/copyright (rev 0)
+++ trunk/gmyth-stream/server/0.3/debian/copyright 2007-08-21 15:04:44 UTC (rev 821)
@@ -0,0 +1,19 @@
+It was downloaded from: http://gmyth.sourceforge.net/wiki/
+
+License:
+ This package 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.
+
+ This package 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 this package; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+On Debian systems, the complete text of the GNU General Public License can
+be found in `/usr/share/common-licenses/GPL'.
Added: trunk/gmyth-stream/server/0.3/debian/gms.install
===================================================================
--- trunk/gmyth-stream/server/0.3/debian/gms.install (rev 0)
+++ trunk/gmyth-stream/server/0.3/debian/gms.install 2007-08-21 15:04:44 UTC (rev 821)
@@ -0,0 +1,8 @@
+debian/tmp/usr/share/gms/lib/*.py usr/share/gms/lib
+debian/tmp/usr/share/gms/plugins/*.py usr/share/gms/plugins
+debian/tmp/usr/share/gms/plugins/transcoders/*.py usr/share/gms/plugins/transcoders
+debian/tmp/usr/share/gms/plugins/transcoders/mencoder_lib/*.py usr/share/gms/plugins/transcoders/mencoder_lib
+debian/tmp/usr/share/gms/html/* usr/share/gms/html
+debian/tmp/usr/bin/* usr/bin
+debian/etc/init.d/gmsd etc/init.d
+debian/etc/gms/*.conf etc/gms/
Property changes on: trunk/gmyth-stream/server/0.3/debian/gms.install
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/gmyth-stream/server/0.3/debian/gms.postinst
===================================================================
--- trunk/gmyth-stream/server/0.3/debian/gms.postinst (rev 0)
+++ trunk/gmyth-stream/server/0.3/debian/gms.postinst 2007-08-21 15:04:44 UTC (rev 821)
@@ -0,0 +1,29 @@
+#! /bin/sh
+# postinst script for gms
+
+set -e
+
+case "$1" in
+ configure)
+ if ! getent passwd gms >/dev/null; then
+ adduser --disabled-password --quiet --system \
+ --home /var/gms-media \
+ --gecos "GMS media dir" --group gms
+ fi
+ if ! getent passwd gms | grep -q /var/run/gms; then
+ usermod -d /var/gms-media gms
+ fi
+ update-rc.d gmsd defaults
+ invoke-rc.d gmsd start
+ ;;
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
Added: trunk/gmyth-stream/server/0.3/debian/gms.postrm
===================================================================
--- trunk/gmyth-stream/server/0.3/debian/gms.postrm (rev 0)
+++ trunk/gmyth-stream/server/0.3/debian/gms.postrm 2007-08-21 15:04:44 UTC (rev 821)
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+#DEBHELPER#
+
+if [ "$1" = "purge" ] ; then
+ invoke-rc.d --force gms stop
+ deluser --quiet --system gms > /dev/null || true
+ delgroup --quiet --system gms > /dev/null || true
+fi
+
+exit 0
Added: trunk/gmyth-stream/server/0.3/debian/rules
===================================================================
--- trunk/gmyth-stream/server/0.3/debian/rules (rev 0)
+++ trunk/gmyth-stream/server/0.3/debian/rules 2007-08-21 15:04:44 UTC (rev 821)
@@ -0,0 +1,52 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+PYVER=2.5
+PYTHON=python$(PYVER)
+
+PREFIX=debian/tmp
+
+build: build-stamp
+
+build-stamp:
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_installdirs
+ dh_clean -k
+
+ @rm -rf build
+ @$(PYTHON) setup.py install --prefix=$(PREFIX)/usr --no-compile --install-purelib=$(PREFIX)/usr/share/gms
+ install -D -o root -g root -m 755 $(PREFIX)/usr/etc/init.d/gmsd debian/$(cdbs_curpkg)/etc/init.d/gmsd
+ install -D -o root -g root -m 755 $(PREFIX)/usr/etc/gms/server.conf debian/$(cdbs_curpkg)/etc/gms/server.conf
+
+ dh_install
+
+# Build architecture-independent files here.
+binary-indep: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep
+.PHONY: clean binary-indep binary install
+
Property changes on: trunk/gmyth-stream/server/0.3/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/gmyth-stream/server/0.3/gms.py
===================================================================
--- trunk/gmyth-stream/server/0.3/gms.py 2007-08-21 15:02:24 UTC (rev 820)
+++ trunk/gmyth-stream/server/0.3/gms.py 2007-08-21 15:04:44 UTC (rev 821)
@@ -5,12 +5,18 @@
__license__ = "GPL"
__version__ = "0.3"
__thanks__ = "Gustavo Sverzut Barbieri"
+__GMS_DATA_DIR__ = "/usr/share/gms/"
import sys
import os
import mimetypes
import logging as log
+
+if os.path.exists (__GMS_DATA_DIR__):
+ sys.path.append(__GMS_DATA_DIR__)
+
from lib.server import serve_forever, load_plugins_transcoders
+from lib.utils import config
mimetypes.init()
log_level = log.INFO
@@ -23,9 +29,46 @@
"\t%(message)s"),
datefmt="%Y-%m-%d %H:%M:%S")
-if not os.path.exists(".transcoded"):
- os.mkdir(".transcoded")
+if config.get_transcoded_location () is None:
+ print "Gms not configured"
+ exit (0)
-pd = os.path.join("plugins", "transcoders")
-load_plugins_transcoders(pd)
+if not os.path.exists(config.get_transcoded_location()):
+ os.mkdir(config.get_transcoded_location())
+
+
+if "-d" in sys.argv:
+ #run with deamon
+ try:
+ pid = os.fork()
+ if pid > 0:
+ sys.exit(0)
+ except OSError, e:
+ print >>sys.stderr, "Fail to start deamon: %d (%s)" % (e.errno, e.strerror)
+ sys.exit(1)
+
+ os.chdir("/")
+ os.setsid()
+ os.umask(0)
+
+ try:
+ pid = os.fork()
+ if pid > 0:
+ fp = open ("/var/run/gms.pid", "w")
+ fp.write ("%d" % pid)
+ fp.close ()
+ sys.exit(0)
+ except OSError, e:
+ print >>sys.stderr, "Fail to start deamon: %d (%s)" % (e.errno, e.strerror)
+ sys.exit(1)
+
+# main deamon
+pd = os.path.join(__GMS_DATA_DIR__, "plugins", "transcoders")
+if os.path.exists (pd):
+ load_plugins_transcoders(pd)
+
+pd = os.path.join("plugins", "transcoders");
+if os.path.exists (pd):
+ load_plugins_transcoders(pd)
+
serve_forever()
Modified: trunk/gmyth-stream/server/0.3/lib/file_handler.py
===================================================================
--- trunk/gmyth-stream/server/0.3/lib/file_handler.py 2007-08-21 15:02:24 UTC (rev 820)
+++ trunk/gmyth-stream/server/0.3/lib/file_handler.py 2007-08-21 15:04:44 UTC (rev 821)
@@ -32,14 +32,20 @@
name = os.path.basename(self.opts["uri"][0])
self.opts["original"] = [name]
output_file = os.path.basename(self.opts["outfile"][0])
- output = open(".transcoded/%s.dat" % \
- os.path.splitext(output_file)[0], "wb")
+ dat_file = output_file + ".dat";
+ dat_path = os.path.join (utils.config.get_transcoded_location(),
+ dat_file);
+
+ output = open(dat_path, "wb")
# dumps data using the highest protocol
pickle.dump(self.opts, output, -1)
output.close()
else:
name = os.path.splitext(os.path.basename(filename))[0]
- pkl_file = open(".transcoded/%s.dat" % name, "rb")
+ dat_file = name + ".dat";
+ dat_path = os.path.join (utils.config.get_transcoded_location(),
+ dat_file);
+ pkl_file = open(dat_path, "rb")
self.opts = pickle.load(pkl_file)
# __init__()
Added: trunk/gmyth-stream/server/0.3/lib/gmsconfig.py
===================================================================
--- trunk/gmyth-stream/server/0.3/lib/gmsconfig.py (rev 0)
+++ trunk/gmyth-stream/server/0.3/lib/gmsconfig.py 2007-08-21 15:04:44 UTC (rev 821)
@@ -0,0 +1,42 @@
+#!/usr/bin/env
+
+__author__ = "Renato Araujo Oliveira Filho"
+__author_email__ = "ren...@in..."
+__license__ = "GPL"
+__version__ = "0.3"
+
+
+import os
+import ConfigParser
+
+__all__ = ("GmsConfig")
+
+class GmsConfig:
+ config = ConfigParser.ConfigParser()
+ __CONFIG_FILE__ = "server.conf"
+
+ def __init__(self):
+ file_name = os.path.join (os.path.expanduser("~"), ".gms", self.__CONFIG_FILE__)
+ print "test config file: %s" % file_name
+ if os.path.exists (file_name):
+ fp = open (file_name, "r")
+ self.config.readfp (fp)
+ return
+
+ file_name = os.path.join ("/", "etc", "gms", self.__CONFIG_FILE__)
+ print "test config file: %s" % file_name
+ if os.path.exists (file_name):
+ fp = open (file_name, "r")
+ self.config.readfp (fp)
+ return
+ # __init__()
+
+ def get_transcoded_location (self):
+ try:
+ return self.config.get("PATHS", "transcoded")
+ except:
+ return None
+ # get_transcoded_location()
+
+
+# GmsConfig
Modified: trunk/gmyth-stream/server/0.3/lib/request_handler.py
===================================================================
--- trunk/gmyth-stream/server/0.3/lib/request_handler.py 2007-08-21 15:02:24 UTC (rev 820)
+++ trunk/gmyth-stream/server/0.3/lib/request_handler.py 2007-08-21 15:04:44 UTC (rev 821)
@@ -145,7 +145,7 @@
if body:
file_list = []
- files.list_media_files(".transcoded", file_list)
+ files.list_media_files(utils.config.get_transcoded_location(), file_list)
output = files.FileList(map(lambda x, y: x+y, file_list,
["<br>"]*len(file_list)))
self.wfile.write(output)
@@ -362,7 +362,7 @@
return
#Only stream files on .transcode dir
- filename = ".transcoded/" + os.path.basename(filename)
+ filename = os.path.join (utils.config.get_transcoded_location(), os.path.basename(filename))
self.log.error("Stream file: %s" % filename)
if not os.path.exists (filename):
self.send_error(404, "File not found")
Modified: trunk/gmyth-stream/server/0.3/lib/utils.py
===================================================================
--- trunk/gmyth-stream/server/0.3/lib/utils.py 2007-08-21 15:02:24 UTC (rev 820)
+++ trunk/gmyth-stream/server/0.3/lib/utils.py 2007-08-21 15:04:44 UTC (rev 821)
@@ -13,7 +13,10 @@
import gobject
import imp
+import gmsconfig
+
log = logging.getLogger("gms.utils")
+config = gmsconfig.GmsConfig()
__all__ = ("which", "load_plugins", "PluginSet", "getHTML",
"progress_bar", "create_tid", "list_media_files")
@@ -188,4 +191,3 @@
return tid
# create_id()
-
Modified: trunk/gmyth-stream/server/0.3/plugins/transcoders/gmencoder.py
===================================================================
--- trunk/gmyth-stream/server/0.3/plugins/transcoders/gmencoder.py 2007-08-21 15:02:24 UTC (rev 820)
+++ trunk/gmyth-stream/server/0.3/plugins/transcoders/gmencoder.py 2007-08-21 15:04:44 UTC (rev 821)
@@ -60,7 +60,7 @@
outfile = self.params_first("outfile", "")
if outfile != "":
- path = os.path.join(sys.path[0], ".transcoded", outfile)
+ path = os.path.join(utils.config.get_transcoded_location(), outfile)
self._insert_param("-o", "file://%s" % path)
else:
self._insert_param ("-o", "fd://%d" % outfd.fileno())
Added: trunk/gmyth-stream/server/0.3/setup.py
===================================================================
--- trunk/gmyth-stream/server/0.3/setup.py (rev 0)
+++ trunk/gmyth-stream/server/0.3/setup.py 2007-08-21 15:04:44 UTC (rev 821)
@@ -0,0 +1,17 @@
+from distutils.core import setup
+from glob import glob
+
+setup(name='gms',
+ version='0.6',
+ description='carman rich view package',
+ long_description='carman rich view (SDL based) package',
+ url='http://www.indt.org.br',
+ scripts=['gms.py'],
+ package_dir={'lib': 'lib', 'plugins' : 'plugins','data' : 'data' },
+ packages=['lib','plugins','plugins.transcoders','plugins.transcoders.mencoder_lib'],
+ data_files = [
+ ('share/gms/html', glob("html/*")),
+ ('etc/init.d', ['data/gmsd']),
+ ('etc/gms', ['data/server.conf'])
+ ],
+ )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ren...@us...> - 2007-08-21 16:14:40
|
Revision: 822
http://gmyth.svn.sourceforge.net/gmyth/?rev=822&view=rev
Author: renatofilho
Date: 2007-08-21 09:14:42 -0700 (Tue, 21 Aug 2007)
Log Message:
-----------
redirect log message on service
Added Paths:
-----------
trunk/gmyth-stream/server/0.3/data/
trunk/gmyth-stream/server/0.3/data/gmsd
trunk/gmyth-stream/server/0.3/data/server.conf
Added: trunk/gmyth-stream/server/0.3/data/gmsd
===================================================================
--- trunk/gmyth-stream/server/0.3/data/gmsd (rev 0)
+++ trunk/gmyth-stream/server/0.3/data/gmsd 2007-08-21 16:14:42 UTC (rev 822)
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+PROGRAM_NAME=GMS
+PROGRAM_BIN=/usr/bin/gms.py
+PIDFILE=/var/run/gms.pid
+LOGFILE=/var/log/gms.log
+
+test -x $PROGRAM_BIN || exit 0
+
+set -e
+
+. /lib/lsb/init-functions
+. /etc/default/rcS
+
+case $1 in
+ start)
+ echo -n "Starting $PROGRAM_NAME: "
+ if [ -f $PIDFILE ]
+ then
+ PID=`cat $PIDFILE`
+
+ if ps ax | grep -q "^$PID"
+ then
+ echo "$PROGRAM_NAME already running."
+ else
+ rm -f $PIDFILE
+ $PROGRAM_BIN -d > $LOGFILE
+ echo "OK"
+ fi
+ else
+ $PROGRAM_BIN -d > $LOGFILE
+ echo "OK"
+ fi
+ ;;
+
+ stop)
+ echo -n "Stopping $PROGRAM_NAME: "
+ if [ -f $PIDFILE ]
+ then
+ PID=`cat $PIDFILE`
+ if ps ax | grep -q "^$PID"
+ then
+ kill -10 $PID
+ fi
+ rm $PIDFILE
+ else
+ echo "No $PROGRAM_NAME found running; no killed."
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+
+ *)
+ log_success_msg "Usage: $0 {stop|start|restart}"
+ exit 1
+ ;;
+esac
Property changes on: trunk/gmyth-stream/server/0.3/data/gmsd
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/gmyth-stream/server/0.3/data/server.conf
===================================================================
--- trunk/gmyth-stream/server/0.3/data/server.conf (rev 0)
+++ trunk/gmyth-stream/server/0.3/data/server.conf 2007-08-21 16:14:42 UTC (rev 822)
@@ -0,0 +1,2 @@
+[PATHS]
+transcoded=/var/gms-media
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ren...@us...> - 2007-08-23 13:24:43
|
Revision: 829
http://gmyth.svn.sourceforge.net/gmyth/?rev=829&view=rev
Author: renatofilho
Date: 2007-08-23 06:24:46 -0700 (Thu, 23 Aug 2007)
Log Message:
-----------
created default config file to mantain compatibility
Modified Paths:
--------------
trunk/gmyth-stream/server/0.3/lib/gmsconfig.py
Added Paths:
-----------
trunk/gmyth-stream/server/0.3/server.conf
Modified: trunk/gmyth-stream/server/0.3/lib/gmsconfig.py
===================================================================
--- trunk/gmyth-stream/server/0.3/lib/gmsconfig.py 2007-08-22 16:57:16 UTC (rev 828)
+++ trunk/gmyth-stream/server/0.3/lib/gmsconfig.py 2007-08-23 13:24:46 UTC (rev 829)
@@ -14,21 +14,18 @@
class GmsConfig:
config = ConfigParser.ConfigParser()
__CONFIG_FILE__ = "server.conf"
+ __CONFIG_DIRS__ = [os.path.join (os.path.expanduser("~"), ".gms"), \
+ os.path.join ("/", "etc", "gms"), \
+ "."]
def __init__(self):
- file_name = os.path.join (os.path.expanduser("~"), ".gms", self.__CONFIG_FILE__)
- print "test config file: %s" % file_name
- if os.path.exists (file_name):
- fp = open (file_name, "r")
- self.config.readfp (fp)
- return
-
- file_name = os.path.join ("/", "etc", "gms", self.__CONFIG_FILE__)
- print "test config file: %s" % file_name
- if os.path.exists (file_name):
- fp = open (file_name, "r")
- self.config.readfp (fp)
- return
+ for path in self.__CONFIG_DIRS__:
+ file_name = os.path.join (path, self.__CONFIG_FILE__)
+ print "test config file: %s" % file_name
+ if os.path.exists (file_name):
+ fp = open (file_name, "r")
+ self.config.readfp (fp)
+ return
# __init__()
def get_transcoded_location (self):
Added: trunk/gmyth-stream/server/0.3/server.conf
===================================================================
--- trunk/gmyth-stream/server/0.3/server.conf (rev 0)
+++ trunk/gmyth-stream/server/0.3/server.conf 2007-08-23 13:24:46 UTC (rev 829)
@@ -0,0 +1,2 @@
+[PATHS]
+transcoded=.transcoded
Property changes on: trunk/gmyth-stream/server/0.3/server.conf
___________________________________________________________________
Name: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|