#!/bin/sh
# LexiVirt OS update tool. Runs the release that /opt/lexivirt/current points to, resolved once:
# switching releases during an update does not change the code that is carrying it out.
REL=$(readlink -f /opt/lexivirt/current)
[ -f /etc/lexivirt/lexivirt.env ] && set -a && . /etc/lexivirt/lexivirt.env && set +a
# PYTHONSAFEPATH: never import from the working directory (root may run this anywhere)
export PYTHONPATH="$REL/controlplane" PYTHONSAFEPATH=1
exec "$REL/venv/bin/python" -m lexivirt.updater "$@"
