Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #232432
| From | Andrei POPESCU <andreimpopescu@gmail.com> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: user unit file |
| Date | 2021-03-05 21:50 +0100 |
| Message-ID | <BPpyx-8lW-3@gated-at.bofh.it> (permalink) |
| References | <BPmhj-6rt-3@gated-at.bofh.it> <BPmAF-6xU-5@gated-at.bofh.it> <BPmU2-6ET-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Vi, 05 mar 21, 12:53:24, Jim Popovitch wrote: > > Right now I can't get this to work: > > ~$ systemctl --user enable Test.service > Failed to connect to bus: No such file or directory To save you some head banging after you fix this... > ~$ cat ~/.config/systemd/user/Test.service > [Unit] > Description = Test Service > After = network.target > > [Service] > WorkingDirectory=/home/bob/Test/ > ExecStart = bash Test.sh > TimeoutSec=15 > > [Install] > WantedBy=multi-user.target ... user units and system units are completely isolated from each other, so your After= and WantedBy= won't have the expected effect. For WantedBy= you probably want (no pun intended) default.target instead. This is a hack I'm using to order a user unite after a system unit is started: ExecStartPre=/usr/bin/sh -c 'until systemctl --quiet is-active network-online.target ; do sleep 1 ; done' Note: you should read on network-online.target in systemd.special(7) if you intend to follow my example. Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
user unit file Jim Popovitch <jim@k4vqc.com> - 2021-03-05 18:20 +0100
Re: user unit file Sven Hartge <sven@svenhartge.de> - 2021-03-05 18:40 +0100
Re: user unit file Jim Popovitch <jim@k4vqc.com> - 2021-03-05 19:00 +0100
Re: user unit file Greg Wooledge <greg@wooledge.org> - 2021-03-05 19:20 +0100
Re: user unit file Jim Popovitch <jim@k4vqc.com> - 2021-03-05 19:20 +0100
Re: user unit file Greg Wooledge <greg@wooledge.org> - 2021-03-05 19:40 +0100
Re: user unit file Jim Popovitch <jim@k4vqc.com> - 2021-03-05 20:20 +0100
Re: user unit file Greg Wooledge <greg@wooledge.org> - 2021-03-05 20:30 +0100
Re: user unit file Jim Popovitch <jim@k4vqc.com> - 2021-03-05 20:40 +0100
Re: user unit file Jim Popovitch <jim@k4vqc.com> - 2021-03-05 20:30 +0100
Re: user unit file Greg Wooledge <greg@wooledge.org> - 2021-03-05 20:30 +0100
Re: user unit file Jim Popovitch <jim@k4vqc.com> - 2021-03-05 20:40 +0100
Re: user unit file Andrei POPESCU <andreimpopescu@gmail.com> - 2021-03-05 21:50 +0100
Re: user unit file Jim Popovitch <jim@k4vqc.com> - 2021-03-06 00:50 +0100
csiph-web