From 818e7e1fde509b9fa019a4de32207ec4f65ba490 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 23 Jul 2022 03:49:39 +0200 Subject: [PATCH] specific driver-lxc config file --- conf/client.hcl | 8 -------- conf/driver-lxc.hcl | 7 +++++++ scripts/install | 4 ++++ scripts/upgrade | 4 ++++ 4 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 conf/driver-lxc.hcl 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 #=================================================