private static Statement authorizePortInIpTables() { return new StatementList( exec("iptables -I INPUT 1 -p tcp --dport " + port + " -j ACCEPT"), exec("iptables-save")); }
public static Statement start() { return new StatementList( literal("cd " + JETTY_HOME), literal("nohup java -jar start.jar jetty.port=" + port + " > start.out 2> start.err < /dev/null &"), literal("test $? && sleep 1")); // in case it is slow starting the proc }
private static Statement authorizePortInIpTables() { return new StatementList( exec("iptables -I INPUT 1 -p tcp --dport " + port + " -j ACCEPT"), exec("iptables-save")); }
public static Statement stop() { return new StatementList( literal("cd " + JETTY_HOME), literal("./bin/jetty.sh stop")); } }