[SCM] crtmpserver/master: Makes main configuration script more clean

jet-guest at users.alioth.debian.org jet-guest at users.alioth.debian.org
Mon Oct 10 17:50:46 UTC 2011


The following commit has been merged in the master branch:
commit b84fd22ba0abf1805218ce5d809a1d3154081df6
Author: Andriy Beregovenko <jet at jet.kiev.ua>
Date:   Mon Oct 10 20:50:06 2011 +0300

    Makes main configuration script more clean

diff --git a/debian/crtmpserver-scripts/crtmpserver.lua b/debian/crtmpserver-scripts/crtmpserver.lua
index 5654240..efc3d6b 100644
--- a/debian/crtmpserver-scripts/crtmpserver.lua
+++ b/debian/crtmpserver-scripts/crtmpserver.lua
@@ -59,6 +59,8 @@ function read_applications()
 	
 	-- Loads applications configuration listed in file "enabled_apps"
 	for app in io.lines(enabled_apps) do
+		app = (app:gsub("^%s*(.-)%s*$", "%1"))
+		application = nil
 		if ( app:match("^#.*$") or app:match("^$") or app:match("^\s+$") ) then
 			--print("string '"..app.."' is unneeded, skip it")
 		else
@@ -68,7 +70,12 @@ function read_applications()
 				os.exit()
 			end
 			dofile(app_config)
-			table.insert(result, application)
+			if (application == nil) then
+				print("Configuration file '"..app_config.."' does not contain variable 'application'")
+				os.exit()
+			else
+				table.insert(result, application)
+			end
 		end
 	end
 	return result

-- 
crtmpserver packaging



More information about the pkg-multimedia-commits mailing list