diff --git a/conf/client.hcl b/conf/client.hcl index 1c12243..ee2067f 100644 --- a/conf/client.hcl +++ b/conf/client.hcl @@ -39,11 +39,3 @@ client { # determined dynamically. network_speed = 100 } - -plugin "nomad-driver-lxc" { - config { - enabled = true - volumes_enabled = true - lxc_path = "/var/lib/lxc" - } -} diff --git a/conf/driver-lxc.hcl b/conf/driver-lxc.hcl new file mode 100644 index 0000000..b0b9431 --- /dev/null +++ b/conf/driver-lxc.hcl @@ -0,0 +1,7 @@ +plugin "nomad-driver-lxc" { + config { + enabled = true + volumes_enabled = true + lxc_path = "/var/lib/lxc" + } +} diff --git a/scripts/install b/scripts/install index d225cfd..fb436dc 100755 --- a/scripts/install +++ b/scripts/install @@ -186,6 +186,10 @@ then chmod 400 "$config_path/client.hcl" chown $app:$app "$config_path/client.hcl" + ynh_add_config --template="../conf/driver-lxc.hcl" --destination="$config_path/driver-lxc.hcl" + chmod 400 "$config_path/driver-lxc.hcl" + chown $app:$app "$config_path/driver-lxc.hcl" + ynh_add_config --template="../conf/dnsmasq-lxd" --destination="/etc/dnsmasq.d/lxd" systemctl restart dnsmasq diff --git a/scripts/upgrade b/scripts/upgrade index 94ff385..09cfc68 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -149,6 +149,10 @@ then ynh_add_config --template="../conf/client.hcl" --destination="$config_path/client.hcl" chmod 400 "$config_path/client.hcl" chown $app:$app "$config_path/client.hcl" + + ynh_add_config --template="../conf/driver-lxc.hcl" --destination="$config_path/driver-lxc.hcl" + chmod 400 "$config_path/driver-lxc.hcl" + chown $app:$app "$config_path/driver-lxc.hcl" fi #=================================================