tails-wait-until-tor-has-bootstrapped.service 682 Bytes
Newer Older
intrigeri's avatar
intrigeri committed
1
2
3
4
5
# The systemd user and system instances don't share units. So, we have
# the *system* tails-wait-until-tor-has-bootstrapped.service create
# a file upon completion -- and the identically named *user* unit file wait for
# that file to appear.

6
7
8
9
10
11
12
13
14
15
16
17
18
[Unit]
Description=Wait for Tor to Have Bootstrapped
Documentation=https://tails.boum.org/contribute/design/

[Service]
Type=oneshot
ExecStart=/bin/sh -c '[ "$(/usr/bin/id -u)" = 1000 ] || exit 0         ; \
                      while ! [ -e /run/tor-has-bootstrapped/done ] ; do \
                         /bin/sleep 1                                  ; \
                      done'
TimeoutStartSec=0

[Install]
19
WantedBy=desktop.target