Skip to content

Commit

Permalink
systemd example: reduce risk of naive breakage
Browse files Browse the repository at this point in the history
In commit c788742 I made various updates to one of the example systemd service
scripts, but one change causes breakage if and only if the service file is
itself named `nats.service` when installed.

We now know that some folks are doing just that, automatically; it's bad to
have a config file which only works if it has certain names (and a little
surprising that systemd doesn't detect that the alias matches its current name
and filters).

So turn that directive into a commented-out suggestion.
  • Loading branch information
philpennock committed Jun 6, 2024
1 parent f90ef7b commit bcd3f91
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion util/nats-server-hardened.service
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,6 @@ ReadWritePaths=/var/lib/nats

[Install]
WantedBy=multi-user.target
Alias=nats.service
# If you install this service as nats-server.service and want 'nats'
# to work as an alias, then uncomment this next line:
#Alias=nats.service

0 comments on commit bcd3f91

Please sign in to comment.