]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Use /run/inspircd as the runtime directory on Linux. insp3
authorSadie Powell <sadie@witchery.services>
Fri, 11 Jun 2021 07:23:11 +0000 (08:23 +0100)
committerSadie Powell <sadie@witchery.services>
Fri, 11 Jun 2021 07:23:11 +0000 (08:23 +0100)
Unfortunately some tooling like AppArmor is not smart enough to
follow the symlink from /var/run to /run so we need to explicitly
set the path. This fixes running InspIRCd without --nopid on some
systems.

See also: inspircd/inspircd-packages#402ef9a411.

configure

index 60624ca4f53b64f3a5456c8d170685d5de53e77b..f1813bf09801322db0617e615f851d12aee474c6 100755 (executable)
--- a/configure
+++ b/configure
@@ -213,7 +213,7 @@ if (defined $opt_portable) {
        $config{LOG_DIR}     = $opt_log_dir     // catdir $config{BASE_DIR}, 'var/log/inspircd';
        $config{MANUAL_DIR}  = $opt_manual_dir  // catdir $config{BASE_DIR}, 'usr/share/man/man1';
        $config{MODULE_DIR}  = $opt_module_dir  // catdir $config{BASE_DIR}, 'usr/lib/inspircd';
-       $config{RUNTIME_DIR} = $opt_runtime_dir // catdir $config{BASE_DIR}, 'var/run/inspircd';
+       $config{RUNTIME_DIR} = $opt_runtime_dir // catdir $config{BASE_DIR}, $^O eq 'linux' ? '/run/inspircd' : '/var/run/inspircd';
        $config{SCRIPT_DIR}  = $opt_script_dir  // catdir $config{BASE_DIR}, 'usr/share/inspircd';
 } else {
        $config{BASE_DIR}    = rel2abs $opt_prefix // $config{BASE_DIR}    // catdir $RealDir,            'run';