Skip to content
Snippets Groups Projects
Commit 2635762b authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

systemd/knot-resolver.service.in: generalize paths

I can't see why not.  Also avoid unnecessary /usr/bin/env
kresd doesn't work well without `ninja install` anyway.

bindir: maybe we should install the python binaries into sbin instead.
We're also being slightly inconsistent - allowing to override some
directories by meson but not respecting it for the python stuff.
parent 9035bbba
No related branches found
No related tags found
1 merge request!1395systemd/knot-resolver.service.in tweaks
Pipeline #113350 waiting for manual action
Pipeline: Knot Resolver

#113351

    ......@@ -53,6 +53,7 @@ etc_dir = prefix / get_option('sysconfdir') / 'knot-resolver'
    lib_dir = prefix / get_option('libdir') / 'knot-resolver'
    modules_dir = lib_dir / 'kres_modules'
    sbin_dir = prefix / get_option('sbindir')
    bin_dir = prefix / get_option('bindir')
    run_dir = '/run' / 'knot-resolver'
    systemd_work_dir = prefix / get_option('localstatedir') / 'lib' / 'knot-resolver'
    systemd_cache_dir = prefix / get_option('localstatedir') / 'cache' / 'knot-resolver'
    ......
    ......@@ -9,14 +9,14 @@ Wants=nss-lookup.target
    [Service]
    Type=notify
    TimeoutStartSec=10s
    ExecStart=/usr/bin/env knot-resolver --config=/etc/knot-resolver/config.yml
    ExecStart=@bin_dir@/knot-resolver --config=@etc_dir@/config.yml
    ExecReload=@bin_dir@/kresctl --socket @run_dir@/manager.sock reload
    KillSignal=SIGINT
    WorkingDirectory=/var/run/knot-resolver/
    WorkingDirectory=@systemd_work_dir@
    User=@user@
    Group=@group@
    CapabilityBoundingSet=CAP_NET_BIND_SERVICE CAP_SETPCAP
    AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_SETPCAP
    ExecReload=/usr/bin/env kresctl --socket /var/run/knot-resolver/manager.sock reload
    [Install]
    WantedBy=multi-user.target
    \ No newline at end of file
    ......@@ -8,6 +8,7 @@ systemd_config.set('group', group)
    systemd_config.set('systemd_work_dir', systemd_work_dir)
    systemd_config.set('systemd_cache_dir', systemd_cache_dir)
    systemd_config.set('sbin_dir', sbin_dir)
    systemd_config.set('bin_dir', bin_dir)
    systemd_config.set('etc_dir', etc_dir)
    systemd_config.set('run_dir', run_dir)
    systemd_config.set('lib_dir', lib_dir)
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment