avoid nullpointer in pillarservlet
This commit is contained in:
parent
22a99e98a3
commit
694b13bb55
@ -152,16 +152,16 @@ public class JsonPillarServlet extends HttpServlet {
|
||||
}
|
||||
writer.println(" }");
|
||||
writer.println(" , \"validsubdomains\": \"" + validSubdomainNames + "\"");
|
||||
if (passengerPython.length() > 0) {
|
||||
if (passengerPython != null && passengerPython.length() > 0) {
|
||||
writer.println(" , \"passengerpython\": \"" + passengerPython + "\"");
|
||||
}
|
||||
if (passengerNodejs.length() > 0) {
|
||||
if (passengerNodejs != null && passengerNodejs.length() > 0) {
|
||||
writer.println(" , \"passengernodejs\": \"" + passengerNodejs + "\"");
|
||||
}
|
||||
if (passengerRuby.length() > 0) {
|
||||
if (passengerRuby != null && passengerRuby.length() > 0) {
|
||||
writer.println(" , \"passengerruby\": \"" + passengerRuby + "\"");
|
||||
}
|
||||
if (fcgiPhpBin.length() > 0) {
|
||||
if (fcgiPhpBin != null && fcgiPhpBin.length() > 0) {
|
||||
writer.println(" , \"fcgiphpbin\": \"" + fcgiPhpBin + "\"");
|
||||
}
|
||||
writer.println(" }");
|
||||
|
@ -208,6 +208,9 @@ public class Domain extends AbstractEntity {
|
||||
}
|
||||
|
||||
public String getPassengerpython() {
|
||||
if (passengerpython == null) {
|
||||
return "/usr/bin/python3";
|
||||
}
|
||||
return passengerpython;
|
||||
}
|
||||
|
||||
@ -216,6 +219,9 @@ public class Domain extends AbstractEntity {
|
||||
}
|
||||
|
||||
public String getPassengernodejs() {
|
||||
if (passengernodejs == null) {
|
||||
return "/usr/bin/node";
|
||||
}
|
||||
return passengernodejs;
|
||||
}
|
||||
|
||||
@ -224,6 +230,9 @@ public class Domain extends AbstractEntity {
|
||||
}
|
||||
|
||||
public String getPassengerruby() {
|
||||
if (passengerruby == null) {
|
||||
return "/usr/bin/ruby";
|
||||
}
|
||||
return passengerruby;
|
||||
}
|
||||
|
||||
@ -232,6 +241,9 @@ public class Domain extends AbstractEntity {
|
||||
}
|
||||
|
||||
public String getFcgiphpbin() {
|
||||
if (fcgiphpbin == null) {
|
||||
return "/usr/lib/cgi-bin/php";
|
||||
}
|
||||
return fcgiphpbin;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user