Bug 42940 - RFE: enable-and-start in one command
Summary: RFE: enable-and-start in one command
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: Lennart Poettering
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-14 23:16 UTC by Jan ONDREJ (SAL)
Modified: 2015-05-15 14:15 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Jan ONDREJ (SAL) 2011-11-14 23:16:47 UTC
Can you please add an ability to enable and start service in one command? In most cases I run:

systemctl enable name.service
systemctl start name.service

Sometimes I forgot to enable service and it's only started and does not run on next boot. Can you please add an:

systemctl enable-and-start name.service

subcommand or something similar to do this in one command?

Thank you.
Comment 1 Zbigniew Jedrzejewski-Szmek 2013-08-25 02:48:01 UTC
I think we should add something like this. Maybe '--start' option to 'enable' verb?

If we add this, we shouldn't forget about symmetric combination for disabling:
'systemctl --stop disable'?
Comment 2 Lennart Poettering 2013-09-09 18:54:58 UTC
(In reply to comment #1)
> I think we should add something like this. Maybe '--start' option to
> 'enable' verb?
> 
> If we add this, we shouldn't forget about symmetric combination for
> disabling:
> 'systemctl --stop disable'?

Sounds sensible.

Though we need to be carefully not to tape over too much over the differences between units and unit files. i.e. we need to handle nicely that template unit files can be enabled but not started...


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.