1

Pretty new to systemd, so likely (and hopefully) missing something trivial. Thanks in advance.

I'm trying to enable a service (bees btrfs dedup; unit file below), but the enable/[Install] doesn't appear to have any effect?.

I run the following, full output pasted, the enable seems to succeed. I don't see anything related in journalctl. First, added the unit file /etc/systemd/system/[email protected] (listed below)

# systemctl daemon-reload
# echo $?
0
# systemctl enable [email protected] # <-- I believe I don't need an '@name' just '@' here? 
# echo $?
0
# systemctl status [email protected]
Failed to get properties: Unit name [email protected] is neither a valid invocation ID nor unit name.

also, I don't see any basic.target.wants/ over in /usr/lib/systemd/system/; but notice many things are WantedBy=basic.target ... so this might be relevant?

Here's the unit file, which I mvd to /etc/systemd/system/[email protected] prior to running the above

[Unit]
Description=Bees (%i)
Documentation=https://github.com/Zygo/bees
After=sysinit.target

[Service]
Type=simple
ExecStart=/usr/sbin/beesd --no-timestamps %i
CPUAccounting=true
CPUSchedulingPolicy=batch
CPUWeight=12
IOSchedulingClass=idle
IOSchedulingPriority=7
IOWeight=10
KillMode=control-group
KillSignal=SIGTERM
MemoryAccounting=true
Nice=19
Restart=on-abnormal
StartupCPUWeight=25
StartupIOWeight=25

[Install]
WantedBy=basic.target

1 Answer 1

1

I believe I've found the cause;

The above unit file is a template, identified by @; I thought I could instantiate it withOUT an instance name ... but it appears this is wrong. If I give it a name, it is installed as expected.

Note that I missed the %i in the unit file; which is the instance name; so even if it did install correctly with an empty name (I thought would default) the script/unit still probably would have failed

If you're having similar problems, this was the best comprehensive systemd walkthrough: https://www.digitalocean.com/community/tutorials/understanding-systemd-units-and-unit-files

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .