[Unit]
Description=ThingsBoard Gateway
After=network-online.target
Wants=network-online.target
ConditionPathExists=/etc/thingsboard-gateway/config/tb_gateway.json

[Service]
Type=simple
User=thingsboard_gateway
Group=thingsboard_gateway
ExecStart=/usr/bin/python3 /usr/bin/thingsboard-gateway
ExecStop=/bin/kill -INT $MAINPID
ExecReload=/bin/kill -TERM $MAINPID
Restart=on-failure

[Install]
WantedBy=multi-user.target
