LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Systemd Targets (https://www.linuxquestions.org/questions/linux-general-1/systemd-targets-4175429443/)

Brandon9000 09-28-2012 09:23 AM

Systemd Targets
 
In systemd, the System V init concept of runlevels is replaced by the concept of targets. In a service file, e.g. bluetooth.service, in the install section, there will be a line like

WantedBy= multi-user.target

This means that when the target, multi-user, becomes active, the service, bluetooth in my example, will be started.

I am writing a program which needs to list every service's target. So I am trying to program finding it. Of course, my program could go to the /lib/systemd/system directory and parsing bluetooth.service to get the target, but is there some command I could give that would simply print out the target for a given service?

unSpawn 10-17-2012 10:50 AM

Short answer: no
 
Quote:

Originally Posted by Brandon9000 (Post 4791589)
is there some command I could give that would simply print out the target for a given service?

I did call forth the daemon but regardless of the paraphernalia and incantations used it wouldn't be persuaded into emitting a response suitable for parsing.

Brandon9000 10-17-2012 11:59 AM

Thanks for trying.


All times are GMT -5. The time now is 03:08 AM.