I try to port a full stack of services to centos8 and there to systemd start system.
I wrote a 'truc.service' like :
[Unit]
After=network.target network-online.target syslog.target
PartOf=machin.target
[Service]
Type=forking
ExecStart=/my/binary/stuff.bin run %i
[Install]
WantedBy=machin.target
so I describe a "machin.target" like :
[Unit]
Wants=bidule.service
Wants=truc@001.service truc@002.service
[Install]
WantedBy=chose.service
once enabled, and daemon-reloaded by systemctl, if I do
systemctl list-dependencies machin.target
I get
machin.target
--bidule.service
--truc@001.service
--truc@002.service
--truc@machin.service
It looks it tries to start one more instance of 'truc' using its own name, and I don't want it ! Where am I wrong ?
[my english skill might not be good enough and since this is a compagny work, I need to anonymize things. Hope you will understand my problem]