recipe odoo data
This commit is contained in:
+6
-7
@@ -75,9 +75,7 @@ function archive_allconf() {
|
||||
}
|
||||
|
||||
function check_expand_conf() {
|
||||
PREFIX="miaou:conf:check"
|
||||
if ! "$FORCE" && [ -f "$EXPANDED_CONF" ] && [ "$EXPANDED_CONF" -nt "$CONF" ] && [ "$EXPANDED_CONF" -nt "$DEFAULTS" ]; then
|
||||
echo "already expanded!"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
@@ -415,15 +413,16 @@ function build_services() {
|
||||
|
||||
domain=${item[0]}
|
||||
subdomain=${item[1]}
|
||||
data=$(yqm ".services.\"$domain\".\"$subdomain\".data")
|
||||
echo "domain=$domain, subdomain=$subdomain, data=$data"
|
||||
data=$(yqm ".services.\"$domain\".\"$subdomain\".data|explode(.)")
|
||||
|
||||
recipe="$MIAOU_BASEDIR/recipes/$app/crud.sh"
|
||||
if [[ -f "$recipe" ]]; then
|
||||
echo "read [$app:$name] onto container <$container>"
|
||||
if ! "$recipe" -r --port "$port" --container "$container" --name "$name" --fqdn "$fqdn"; then
|
||||
command="env MIAOU_BASEDIR=$MIAOU_BASEDIR MIAOU_CONFIGDIR=$MIAOU_CONFIGDIR $recipe --port $port --container $container --name $name --fqdn $fqdn"
|
||||
[[ "$data" != "null" ]] && command+=" --data \"$data\""
|
||||
if ! eval "$command -r" >/dev/null; then
|
||||
echoinfo "CREATE RECIPE"
|
||||
"$recipe" -c --port "$port" --container "$container" --name "$name" --fqdn "$fqdn"
|
||||
eval "$command -c"
|
||||
echoinfo "CREATE RECIPE: OK"
|
||||
fi
|
||||
else
|
||||
@@ -457,7 +456,7 @@ fi
|
||||
|
||||
if containsElement options "config"; then
|
||||
editor /etc/miaou/miaou.yaml
|
||||
if diff -q /etc/miaou/miaou.yaml $HOME/.config/miaou/archived/miaou.yaml/previous; then
|
||||
if diff -q /etc/miaou/miaou.yaml "$HOME"/.config/miaou/archived/miaou.yaml/previous; then
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user