#!/bin/bash


mkdir /etc/systemd/system/snap.vantage-agent.vtg-agent.service.d

cat <<EOF | tee /etc/systemd/system/snap.vantage-agent.vtg-agent.service.d/override.conf
[Unit]
ConditionPathExists=/var/snap/vantage-agent/common/.env
[Service]
EnvironmentFile=/var/snap/vantage-agent/common/.env
EOF