## Copyright (C) 2015 Jason Mehring <nrgaway@gmail.com>
## License: GPL-2+

## When running in a TemplateVM,
## creates /run/updatesproxycheck/whonix-secure-proxy if tinyproxy's http
## header contains 'tor'.

[Unit]
Description=Qubes Whonix Torified Updates Proxy Check
Documentation=https://github.com/Whonix/qubes-whonix

Before=qubes-updates-proxy.service
Before=qubes-updates-cache.service

After=network.target
Wants=network.target

After=network-online.target
Wants=network-online.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/lib/qubes-whonix/init/torified-updates-proxy-check
User=updatesproxycheck
TimeoutStartSec=120

[Install]
WantedBy=multi-user.target
