summaryrefslogtreecommitdiffstats
path: root/src/userdb/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'src/userdb/meson.build')
-rw-r--r--src/userdb/meson.build17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/userdb/meson.build b/src/userdb/meson.build
index 2d701c8..413f2be 100644
--- a/src/userdb/meson.build
+++ b/src/userdb/meson.build
@@ -23,3 +23,20 @@ executables += [
'dependencies' : threads,
},
]
+
+if conf.get('ENABLE_SSH_USERDB_CONFIG') == 1
+ custom_target(
+ '20-systemd-userdb.conf',
+ input : '20-systemd-userdb.conf.in',
+ output : '20-systemd-userdb.conf',
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
+ install : true,
+ install_dir : sshdconfdir.startswith('/usr/') ? sshdconfdir : libexecdir / 'sshd_config.d')
+
+ if not sshdconfdir.startswith('/usr/')
+ install_emptydir(sshdconfdir)
+
+ meson.add_install_script(sh, '-c',
+ ln_s.format(libexecdir / 'sshd_config.d' / '20-systemd-userdb.conf', sshdconfdir / '20-systemd-userdb.conf'))
+ endif
+endif