Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // we will make a new config file here
- def newConfig = "";
- def configFile = new File("../lib/config.cfg");
- def config = configFile.text;
- config.eachLine
- {
- line->
- if(line.contains("collector.script.threadpool="))
- {
- def tokens = line.split("=");
- newConfig += tokens.first() + "=" + (tokens.last().toInteger() + 5); // Add 5 to the threads.
- }
- else
- {
- newConfig += line + "\n";
- }
- }
- // newConfig is old one with line changed
- configFile.write(newConfig);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement