Update 'root/etc/uci-defaults/luci-app-lxc-attach'
parent
06e9513551
commit
cf78655bca
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
config_dir=`uci -q get lxc-attach.@lxc-attach[0].config_path`
|
||||
|
||||
data_dir=`docker inspect --format '{{.Mounts}}' lxc-attach | grep -Eom1 '[^ ]+/_data /var/www/html local true ' | cut -d' ' -f1`
|
||||
|
||||
if [ -n "$data_dir" -a "$data_dir" != "$config_dir" ]; then
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set lxc-attach.@lxc-attach[0].config_path="$data_dir"
|
||||
commit lxc-attach
|
||||
EOF
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
config_dir=`uci -q get simplex.@simplex[0].config_path`
|
||||
|
||||
data_dir=`docker inspect --format '{{.Mounts}}' simplex | grep -Eom1 '[^ ]+/_data /var/www/html local true ' | cut -d' ' -f1`
|
||||
|
||||
if [ -n "$data_dir" -a "$data_dir" != "$config_dir" ]; then
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set simplex.@simplex[0].config_path="$data_dir"
|
||||
commit simplex
|
||||
EOF
|
||||
fi
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue