Mailinglist Archive: opensuse (1420 mails)

< Previous Next >
Re: [opensuse] systemd : how to start a script at the end ?
El 12/01/14 14:18, Dsant escribió:
Hello,

HI:

First it is time to get off your mental picture the concept of "at the end" there is no such thing as "end".

I edited systemd on 12.3 to start a calendar server ( http://radicale.org/ ).
The script works very well (good news !) IF I wait 10 seconds ("sleep 10") in
it. If I do not wait, I have a "socket error".
How do I run a script after the other ones ? that is, at end.
I tried "After=network.target" with no luck.


Here is my /lib/systemd/system/radicale.service file :

[Unit]
Description=Radicale calendrier

[Service]
Type=oneshot
ExecStart=/home/prog/radicale.sh

[Install]
WantedBy=multi-user.target
#After=network.target


Dsant


the After= goes in the [Unit] section not in the [install] section.
Use

[Unit]
Wants=network-online.target
After=network-online.target

Note that "network-online.target" appared in systemd 200 and therefore wont work in 12.3 but only in 13.1 .. in older versions using network.target might work.
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
References