Re: Does systemd expose any unit-file-parsing functionality?

2012-03-21 Thread Lennart Poettering
On Sat, 17.03.12 11:41, Tom Lane (t...@redhat.com) wrote: Tomasz Torcz to...@pipebreaker.pl writes: On Sat, Mar 17, 2012 at 10:32:22AM -0400, Tom Lane wrote: I have a shell script that needs to dig the values of a couple of Environment= settings out of a systemd service file. Currently

Re: Does systemd expose any unit-file-parsing functionality?

2012-03-21 Thread Tom Lane
Lennart Poettering mzerq...@0pointer.de writes: On Sat, 17.03.12 11:41, Tom Lane (t...@redhat.com) wrote: Tomasz Torcz to...@pipebreaker.pl writes: You can try systemctl show -p Environment unit [ experiments with that ... ] Hm, the output format seems pretty ill-designed, but I guess I

Re: Does systemd expose any unit-file-parsing functionality?

2012-03-21 Thread Lennart Poettering
On Wed, 21.03.12 20:39, Tom Lane (t...@redhat.com) wrote: Lennart Poettering mzerq...@0pointer.de writes: On Sat, 17.03.12 11:41, Tom Lane (t...@redhat.com) wrote: Tomasz Torcz to...@pipebreaker.pl writes: You can try systemctl show -p Environment unit [ experiments with that ... ]

Re: Does systemd expose any unit-file-parsing functionality?

2012-03-21 Thread Tom Lane
Lennart Poettering mzerq...@0pointer.de writes: On Wed, 21.03.12 20:39, Tom Lane (t...@redhat.com) wrote: ... what I find systemctl show producing is a line like Environment=PGPORT=5432 PGDATA=/var/lib/pgsql/data PGPORT=5433 So I have to pick this apart, understanding that later entries

Re: Does systemd expose any unit-file-parsing functionality?

2012-03-18 Thread Richard W.M. Jones
On Sat, Mar 17, 2012 at 10:32:22AM -0400, Tom Lane wrote: I have a shell script that needs to dig the values of a couple of Environment= settings out of a systemd service file. Currently it just assumes it knows the search path for such things, finds the file, and greps for the right lines.

Re: Does systemd expose any unit-file-parsing functionality?

2012-03-17 Thread Tomasz Torcz
On Sat, Mar 17, 2012 at 10:32:22AM -0400, Tom Lane wrote: I have a shell script that needs to dig the values of a couple of Environment= settings out of a systemd service file. Currently it just assumes it knows the search path for such things, finds the file, and greps for the right lines.

Re: Does systemd expose any unit-file-parsing functionality?

2012-03-17 Thread Tom Lane
Tomasz Torcz to...@pipebreaker.pl writes: On Sat, Mar 17, 2012 at 10:32:22AM -0400, Tom Lane wrote: I have a shell script that needs to dig the values of a couple of Environment= settings out of a systemd service file. Currently it just assumes it knows the search path for such things, finds