Conversation

I run:

sudo systemctl list-units --type=service --all

I find a service in the list user-NAME-REDACTED.service. I made that service. I remember I did. But I don't remember what I did to configure it, and I don't remember what user it's running as I used, and I don't remember much of anything, really. It was a while ago.

Is there a way to relate that line in the systemd list-units list back to a configuration file, or something? I basically want to duplicate it with a different exe

5
0
0

@mcc systemctl cat $whatever.unit will dump all the sources used to assemble the unit

0
1
0

@mcc

systemctl show -P FragmentPath [servicename]

will give you what you want.

0
0
0

@mcc systemctl status shows the path of the .service file

0
0
0

@mcc sudo systemctl status SERVICENAME will show the config file path.

Also I am fully on team we use it at work and it is terrible. I can't believe how much I dislike it actually I am normally level-headed. We used to use something called daemontools which probably cannot solve the problems systemd needs to solve but for actually running services it is just so incredibly straightforward and sensible.

0
0
0

@mcc will `systemctl cat user-NAME-REDACTED.service` do?

1
0
0