The unit files have no installation config

Question

sudo systemctl enable munin
Synchronizing state of munin.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable munin
The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled using systemctl.

Possible reasons for having this kind of units are:
• A unit may be statically enabled by being symlinked from another unit's
  .wants/ or .requires/ directory.
• A unit's purpose may be to act as a helper for some other unit which has
  a requirement dependency on it.
• A unit may be started when needed via activation (socket, path, timer,
  D-Bus, udev, scripted systemctl call, ...).
• In case of template units, the unit is meant to be enabled with some
  instance name specified.

Answer

Add [Install] to /lib/systemd/system/munin.service

[Install]
WantedBy=default.target
[Unit]
Description=Munin service
Documentation=man:munin-cron(8)

[Service]
User=munin
Type=oneshot
ExecStart=/usr/bin/munin-cron

[Install]
WantedBy=default.target
0%