[Unit]
Description=Internet of Agents Service
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/opt/internet_of_agents/agents
EnvironmentFile=/etc/internet_of_agents.env
ExecStartPre=/bin/bash -c 'source /etc/internet_of_agents.env'
ExecStart=/bin/bash -c 'source /etc/internet_of_agents.env && /opt/internet_of_agents/agents/start_running_agents.sh'
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target 