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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.