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,9 +12,10 @@ if systemd_user_unit_dir == ''
systemd_user_unit_dir = join_paths(get_option('prefix'), 'lib', 'systemd', 'user')
endif
# copy the system socket unit to the "user" directory
install_data(
join_paths('..', 'system', 'mpd.socket'),
configure_file(
input: join_paths('..', 'system', 'mpd.socket.in'),
output: 'mpd.socket',
configuration: systemd_socket_conf,
install_dir: systemd_user_unit_dir,
)