Skip to content

Commit

Permalink
build: convert provided unit file to use environment for cmdline args
Browse files Browse the repository at this point in the history
This should hopefully provide a more flexible approach for overriding
the service and update cmdline flags, especially considering systemd
advises against the use of `EnvironmentFile` configs and suggest using
overrides instead.
  • Loading branch information
tjhop committed Jun 22, 2024
1 parent 4790b6f commit f7f4100
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packaging/systemd/mango.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Wants=network.target
After=network.target

[Service]
ExecStart=/usr/bin/mango --inventory.path /opt/mango/inventory --inventory.reload-interval '5m'
Environment="ARGS=--inventory.path /opt/mango/inventory --inventory.reload-interval '5m'"
ExecStart=/usr/bin/mango ${ARGS}
ExecReload=/bin/kill -SIGHUP $MAINPID
Restart=on-failure
KillSignal=SIGINT
Expand Down

0 comments on commit f7f4100

Please sign in to comment.