1

I have a problem with newly created service in systemd. I want, that service A will start after network-online.target What service A does? - runs the script with echo "xxx" > resolf.conf

I tried almost everything : editing network-online.target, network.service but with no effect.

This is how service A looks like:

[Unit]
Description=Nadpisuje plik /etc/resolv.conf
After=network-online.target

[Service]
Type=oneshot
User=root
WorkingDirectory=/opt/
ExecStart=/opt/skrypt.sh
RemainAfterExit=true
StandardOutput=journal

[Install]
WantedBy= multi-user.target basic.target network-online.target
Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
kjkj3456
  • 11
  • 1
  • Related:  [Cause a script to execute after networking has started?](https://unix.stackexchange.com/q/126009/80216)  and  [How can I make my user services wait till the network is online?](https://unix.stackexchange.com/q/216919/80216) – G-Man Says 'Reinstate Monica' Aug 07 '18 at 09:14

0 Answers0