0

I have a simple unit file:

[Unit
Description=do magic foo

[Service]
Type=simple
ExecStart=/usr/bin/foo
Restart=always
RestartSec=5s


[Install]
WantedBy=default.target

If I try to enable it, I receive this message:

root@server# systemctl enable foo
Failed to enable unit: File foo.service: Bad message

What's wrong?

1

There is a typo in the unit file. The closing ] on the first line was missing.

I added the char and now it works.

Your Answer

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

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