Skip to content

Commit

Permalink
Fix OPTS arguments
Browse files Browse the repository at this point in the history
Remove `{}` from OPTS env in ExecStart, causes argument to be sent as a
single quote string, rather than expansion of arguments.

Prefix EnvironmentFile with `-` to make it optional.

Signed-off-by: Ben Kochie <superq@gmail.com>
  • Loading branch information
SuperQ committed Nov 5, 2020
1 parent fce9424 commit 704cb9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packaging/process-exporter.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Description=Process Exporter for Prometheus
[Service]
User=root
Type=simple
EnvironmentFile=/etc/default/process-exporter
ExecStart=/usr/bin/process-exporter ${OPTS}
EnvironmentFile=-/etc/default/process-exporter
ExecStart=/usr/bin/process-exporter $OPTS
KillMode=process
Restart=always

Expand Down

0 comments on commit 704cb9e

Please # to comment.