diff --git a/bin/vps b/bin/vps index f204b72..4d244d5 100755 --- a/bin/vps +++ b/bin/vps @@ -706,6 +706,15 @@ cyclos:set_root_url() { export -f cyclos:set_root_url +cyclos:unlock() { + local project_name="$1" dbname="$2" url="$3" + + echo "delete from database_lock;" | + compose:psql "${project_name}" "${dbname}" +} +export -f cyclos:unlock + + compose:project_name() { if [ -z "$PROJECT_NAME" ]; then PROJECT_NAME=$(compose --get-project-name) || { @@ -1316,11 +1325,8 @@ EOF postgres:restore "$project_name" "$GZ_DUMP_LOCATION" "${cyclos_service}@${cyclos_database}" || exit 1 ## ensure that the database is not locked - ## XXXvlab: 70 is uid of user postgres, this avoids the docker bug - ## but introduce hardwritten value - Wrap -d "check and remove database lock if any" <