private void updateStreamName(){
		String temp_file = "crtmpserver.lua.temp";
		BufferedReader br = null;
		BufferedWriter bw = null;
		try {
			br = new BufferedReader(new FileReader(serverConfigFile));
			bw = new BufferedWriter(new FileWriter(temp_file));
			
			String line;
			while ((line = br.readLine()) != null){
				
				if(line.contains("localStreamName") || line.contains("targetStreamName")){
					line = line.replaceAll("localStreamName=\".*\"", "localStreamName=\"" + CamServer.streamName + "\"");
					line = line.replaceAll("targetStreamName=\".*\"", "targetStreamName=\"" + CamServer.streamName + "\"");
				}
				bw.write(line + "\n");
			}
		} catch (IOException e) {
			e.printStackTrace();
			return;
		} finally {
			try {
				if(br != null){
					br.close();
				}
				if (bw != null){
					bw.close();
				}
			} catch (IOException e){
			}
		}
		
		File oldFile = new File(serverConfigFile);
		oldFile.delete();
		
		File newFile = new File(temp_file);
		newFile.renameTo(oldFile);
		
		streamNameUpdated = true;
	}