I get:

root@dm820:~# ExecStart=/usr/bin/curl'https://dynupdate.no-ip.com/nic/update' --header "Authorization: Basic <$xxxx:$xxx>" -d 'hostname=<hostname>.xxxx.ddns.net'
-sh: --header: command not found

closed as unclear what you're asking by Dave M, bertieb, PeterH, VL-80, music2myear Dec 13 '18 at 17:36

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    What are you trying to achieve? Where did you get this line? It's not a command, but a snipped from systemd service. – gronostaj Dec 6 '18 at 12:01

what do I make wrong?

ExecStart=/usr/bin/curl'https://dynupdate.no-ip.com/nic/update' --header "Authorization: Basic <$xxxx:$xxx>" -d 'hostname=<hostname>.xxxx.ddns.net'
  1. You're defining ExecStart variable and trying to run --header. The syntax is like

    foo=bar some_command option1 option2
  2. You're using the full path /usr/bin/curl. Unless you know it's right and you need the full path, you should rely on your $PATH and use just curl.

  3. You have no space after curl.

  4. You're trying to run curl as root.

  5. You're running a command (like random code from the Internet?) you apparently don't understand as root.

To fix:

  • Write 100 times "I won't run commands I don't understand as root". :)
  • Drop ExecStart=, it's a part of systemd syntax.
  • Use just curl.
  • Put a space after curl.

It will be like

curl 'https://dynupdate.no-ip.com/nic/update' --header "Authorization: Basic <$xxxx:$xxx>" -d 'hostname=<hostname>.xxxx.ddns.net'

where <$xxxx:$xxx> and <hostname> are still placeholders you need to change to something valid.

  • To simplify things a bit more, it would be like curl https://dynupdate.no-ip.com/nic/update --user '$xxxx:$xxx' -d 'hostname=<hostname>.xxxx.ddns.net' – grawity Dec 6 '18 at 12:30
  • @grawity Frankly I don't know curl and such to tell if you're right. The answer is now community wiki, so please improve it freely. – Kamil Maciorowski Dec 6 '18 at 12:33
  • Thanks.Yes it's from internet :superuser.com/questions/1380720/… :) Shall I write down all 100 or can I copy paste :) :) – ddinc Dec 6 '18 at 13:28

If you want to run this from the command line and not from systemd, you have to run it like this:

curl 'https://dynupdate.no-ip.com/nic/update' --header "Authorization: Basic <$xxxx:$xxx>" -d 'hostname=<hostname>.xxxx.ddns.net'
  • another layman question :) then:How do I run it from system d ?(I want to run it from system d but as it did not work out I have asked once more) – ddinc Dec 6 '18 at 13:45
  • Ask a new question and clarify what you want to do ;) Please review superuser.com/help/how-to-ask – mtak Dec 6 '18 at 15:17
  • Solved.......... – ddinc Dec 7 '18 at 10:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.