From cf78655bca20347151fce68dd4a0fe21b5775297 Mon Sep 17 00:00:00 2001 From: ben Date: Sun, 3 Sep 2023 01:20:53 +0000 Subject: [PATCH] Update 'root/etc/uci-defaults/luci-app-lxc-attach' --- root/etc/uci-defaults/luci-app-lxc-attach | 14 ++++++++++++++ root/etc/uci-defaults/luci-app-simplex | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-) create mode 100755 root/etc/uci-defaults/luci-app-lxc-attach delete mode 100755 root/etc/uci-defaults/luci-app-simplex diff --git a/root/etc/uci-defaults/luci-app-lxc-attach b/root/etc/uci-defaults/luci-app-lxc-attach new file mode 100755 index 0000000..b630b46 --- /dev/null +++ b/root/etc/uci-defaults/luci-app-lxc-attach @@ -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 diff --git a/root/etc/uci-defaults/luci-app-simplex b/root/etc/uci-defaults/luci-app-simplex deleted file mode 100755 index 22868dd..0000000 --- a/root/etc/uci-defaults/luci-app-simplex +++ /dev/null @@ -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