Whenever I enable a certain instanced systemd service, I want two timers with the same instance specifier to be enabled as well. This is what my unit file foo@.service looks like:[Unit]Description=Does something coolDocumentation=man:foo(1)[Service]Type=forkingExecStart=/usr/bin/foo %iPIDFile=%t/foo/foo.pidStandardOutput=journal[Install]WantedBy=network-online.targetAlso=bar1@%i.timerAlso=bar2@%i.timerRunning systemctl enable foo@test.service returns:Failed to enable unit: Invalid argumentIf I remove the instance specifiers from the [Install] section and replace them with specific instance names (so it looks like the following), then it works just fine....Also=bar1@test.timerAlso=bar2@test.timerThe man page systemd.unit(5) says that the %i specifier is interpreted in the install section, so what gives?The following specifiers are interpreted in the Install section: %n, %N, %p, %i, %U, %u, %m, %H, %b, %v.
How can I enable multiple systemd unit files with the same instance specifier?
systemd