On Wed, 25 Mar 2015, Raphael Hertzog wrote:
> Hello,
> 
> while discussing on #debian-systemd we have found another possible way
> to have the service managed under two names:

And a tested version of this hack courtesy of Didier Roche (with
foo.service the real service file, and bar.service the aliased variant):

foo.service:
[Unit]
BindsTo=bar.service

[Service]
ExecStart=/bin/sleep 300

[Install]
Also=bar.service
WantedBy=multi-user.target


bar.service:
[Unit]
BindsTo=foo.service

[Service]
Type=oneshot
ExecStart=/bin/true
RemainAfterExit=True

[Install]
Also=foo.service
WantedBy=multi-user.target

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: http://www.freexian.com/services/debian-lts.html
Learn to master Debian: http://debian-handbook.info/get/


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to