systemd: base "ListenStream" on build options

Make `mpd.socket` configurable based on build options, so that e.g.
`ListenStream=6600` is not added if `tcp` option is not enabled.
This commit is contained in:
naglis
2023-09-15 22:04:38 +03:00
parent 9bb67ae7f0
commit df069bc456
4 changed files with 19 additions and 7 deletions

View File

@@ -12,8 +12,10 @@ if systemd_system_unit_dir == ''
systemd_system_unit_dir = join_paths(get_option('prefix'), 'lib', 'systemd', 'system')
endif
install_data(
'mpd.socket',
configure_file(
input: 'mpd.socket.in',
output: 'mpd.socket',
configuration: systemd_socket_conf,
install_dir: systemd_system_unit_dir,
)

View File

@@ -1,6 +1,5 @@
[Socket]
ListenStream=%t/mpd/socket
ListenStream=6600
@listen_streams@
Backlog=5
KeepAlive=true
PassCredentials=true