[systemd-devel] Is there a way to change the program name in a service file?

Thomas Meyer thomas at m3y3r.de
Mon Dec 31 04:16:36 PST 2012


Am Samstag, den 29.12.2012, 13:24 -0500 schrieb Dave Reisner:
> On Sat, Dec 29, 2012 at 06:24:43PM +0100, Thomas Meyer wrote:
> > Hi,
> > 
> > I want to basically do a "exec -a coolName /usr/bin/java 1 2 3" in a
> > systemd service file. Is this supported?
> > 
> > with kind regards
> > thomas
> > 
> 
> To quote systemd.service(5):
> 
>  Optionally, if the absolute file name is prefixed with '@', the second
>  token will be passed as argv[0] to the executed process, followed by the
>  further arguments specified.
> 

Hi,

thanks and sorry, I missed that one... It works as described, but I
still see this in the journal output:

Dec 31 10:39:17 localhost.localdomain java[31708]: INFO: Server started.

Is there a way to change the name shown in the journalctl short output
mode?

thomas




More information about the systemd-devel mailing list