app_containers: Kill all previously running instances

Because things like dbus can be broken inside.
This commit is contained in:
Peter Cai 2022-12-31 15:56:09 -05:00
parent edcfaef386
commit 1afb772f71
1 changed files with 4 additions and 0 deletions

View File

@ -29,6 +29,10 @@ if [ -f "$config" ]; then
source "$config"
fi
# Kill any previously running instances
# This could be due to, say, a broken libappindicator icon (because of broken dbus)
sudo -A machinectl kill $CONTAINER_NAME > /dev/null 2>&1
# Create a XDG_RUNTIME_DIR for guest on host
container_xdg_runtime="$(mktemp -d -p /var/tmp)"
trap cleanup EXIT