Adapt paths.

This commit is contained in:
Michael Lipp 2023-06-10 12:45:56 +02:00
parent 20764c9afe
commit a79ef7788b

View file

@ -150,7 +150,7 @@ public class Runner extends Component {
public static final String APP_NAME = "vmrunner"; public static final String APP_NAME = "vmrunner";
private static final String TEMPLATE_DIR private static final String TEMPLATE_DIR
= "/usr/share/" + APP_NAME + "/templates"; = "/opt/" + APP_NAME + "/templates";
private static final String DEFAULT_TEMPLATE private static final String DEFAULT_TEMPLATE
= "Standard-VM-latest.ftl.yaml"; = "Standard-VM-latest.ftl.yaml";
private static final String SAVED_TEMPLATE = "VM.ftl.yaml"; private static final String SAVED_TEMPLATE = "VM.ftl.yaml";
@ -202,7 +202,7 @@ public class Runner extends Component {
// Configuration store with file in /etc (default) // Configuration store with file in /etc (default)
File config = new File(cmdLine.getOptionValue('c', File config = new File(cmdLine.getOptionValue('c',
"/etc/" + APP_NAME + "/config.yaml")); "/etc/opt/" + APP_NAME + "/config.yaml"));
// Don't rely on night config to produce a good exception // Don't rely on night config to produce a good exception
// for this simple case // for this simple case
if (!Files.isReadable(config.toPath())) { if (!Files.isReadable(config.toPath())) {
@ -511,8 +511,8 @@ public class Runner extends Component {
CommandLineParser parser = new DefaultParser(); CommandLineParser parser = new DefaultParser();
// parse the command line arguments // parse the command line arguments
final Options options = new Options(); final Options options = new Options();
options.addOption(new Option("c", "config", true, "The confi" options.addOption(new Option("c", "config", true, "The configu"
+ "guration file (defaults to /etc/vmrunner/config.yaml).")); + "ration file (defaults to /etc/opt/vmrunner/config.yaml)."));
CommandLine cmd = parser.parse(options, args); CommandLine cmd = parser.parse(options, args);
var app = new Runner(cmd); var app = new Runner(cmd);