Skip to content
This repository was archived by the owner on Aug 9, 2019. It is now read-only.

Commit d86b673

Browse files
committed
allow passing of port and services domain into commands
1 parent 56452df commit d86b673

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: Command.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ public void run() {
2727
if (isRunning()) return;
2828
do {
2929

30+
// Pass port and domain of this service to the command if neccessary.
31+
String populatedcmd = cmd.replace("%p", Integer.toString(service.getPort())).replace("%d", Manager.servicesDomain());
3032
try {
31-
final Process process = Runtime.getRuntime().exec(cmd, null, service.getWorkingDir());
33+
final Process process = Runtime.getRuntime().exec(populatedcmd, null, service.getWorkingDir());
3234
running = true;
3335
currentProcess = process;
3436

Diff for: Manager.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public static void updateVarnish() {
7777
*/
7878
public static void setupServices() {
7979

80-
// Make sure the services service is created first, for logging purposes
80+
// Make sure the services service is created first, for logging and reference purposes
8181
services = Service.loadServicesService();
8282
Service.loadServiceList();
8383
}

0 commit comments

Comments
 (0)