Browse Source

chg: [vps] wrap database output upon success when using ``set-cyclos-url`` !minor

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
rc1
Valentin Lab 3 years ago
parent
commit
e9720214a8
  1. 3
      bin/vps

3
bin/vps

@ -1229,11 +1229,14 @@ cmdline.spec:odoo:cmd:set-cyclos-url:run() {
project_name=$(compose:project_name) || exit 1 project_name=$(compose:project_name) || exit 1
URL=$(compose:get_url "${project_name}" "${cyclos_service}") || exit 1 URL=$(compose:get_url "${project_name}" "${cyclos_service}") || exit 1
Wrap -d "set cyclos url to '$URL'" <<EOF || exit 1
echo "UPDATE res_company SET cyclos_server_url = '$URL/api' WHERE id=1;" | echo "UPDATE res_company SET cyclos_server_url = '$URL/api' WHERE id=1;" |
compose:psql "$project_name" "$dbname" || { compose:psql "$project_name" "$dbname" || {
err "Failed to set cyclos url value in '$dbname' database." err "Failed to set cyclos url value in '$dbname' database."
exit 1 exit 1
} }
EOF
} }

Loading…
Cancel
Save