Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #232253
| From | Andrew Spiers <andrew@andrewspiers.net> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: use of $ARGS in systemd unit file by prometheus package |
| Date | 2021-03-02 08:00 +0100 |
| Message-ID | <BO7aF-bL-1@gated-at.bofh.it> (permalink) |
| References | <BO2NI-61e-3@gated-at.bofh.it> <BO3gJ-6ay-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> Hi. > >> ExecStart=/usr/bin/prometheus $ARGS >> >> I know I can simply override the unit file with one in >> /etc/systemd/system, but what if I wanted to use this variable? Where >> would I set it? > > > See "EnvironmentFile" directive above. > Check manual pages for more info: > https://www.freedesktop.org/software/systemd/man/systemd.service.html > and > https://www.freedesktop.org/software/systemd/man/systemd.exec.html > Thanks. I think EnvironmentFile is just used for setting the environment file of the running process. Setting ARGS in /etc/default/prometheus seems to add the value to the command line arguments, as well as to an environment variable called ARGS for the prometheus process. I can't find any mention of this in the systemd or prometheus docs, but it works.
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
use of $ARGS in systemd unit file by prometheus package Andrew Spiers <andrew@andrewspiers.net> - 2021-03-02 03:20 +0100
Re: use of $ARGS in systemd unit file by prometheus package IL Ka <kazakevichilya@gmail.com> - 2021-03-02 03:50 +0100
Re: use of $ARGS in systemd unit file by prometheus package Andrew Spiers <andrew@andrewspiers.net> - 2021-03-02 08:00 +0100
Re: use of $ARGS in systemd unit file by prometheus package Greg Wooledge <greg@wooledge.org> - 2021-03-02 16:20 +0100
csiph-web