## Copyright (C) 2019 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
## See the file COPYING for copying conditions.

[Unit]
Description=Helper Service for /usr/bin/torbrowser to set file owner of /var/cache/tb-binary to user in Qubes DispVMs by Whonix developers
Documentation=https://github.com/Whonix/tb-updater
ConditionPathExists=!/run/qubes/this-is-templatevm

DefaultDependencies=no
Before=sysinit.target
Requires=local-fs.target
After=local-fs.target

After=proc-xen.mount systemd-modules-load.service qubes-db.service qubes-sysinit.service

After=remount-secure.service

## Preventing race condition with user start through start menu.
## Not the most efficient / clean solution.
## https://phabricator.whonix.org/T424
Before=qubes-gui-agent.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/libexec/tb-updater/dispvm

[Install]
WantedBy=multi-user.target
