aboutsummaryrefslogtreecommitdiff
path: root/make/template
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-01-18 10:30:22 +0000
committerGravatar Sadie Powell2021-01-18 11:42:25 +0000
commitdb0052bcc23f8c8bc5d152d7ebbdda492b56cc4c (patch)
treea18c79a7453fc41665b43e3e77f47f164834e2b4 /make/template
parentMerge branch 'insp3' into master. (diff)
parentAdd a separate stats class for DNSBL errors. (diff)
Merge branch 'insp3' into master.
Diffstat (limited to 'make/template')
-rw-r--r--make/template/apparmor1
-rw-r--r--make/template/config.h3
-rw-r--r--make/template/inspircd18
3 files changed, 7 insertions, 15 deletions
diff --git a/make/template/apparmor b/make/template/apparmor
index 83c248c55..ded5634e6 100644
--- a/make/template/apparmor
+++ b/make/template/apparmor
@@ -37,6 +37,7 @@
@MODULE_DIR@/core_*.so mr,
@MODULE_DIR@/m_*.so mr,
@LOG_DIR@/** w,
+ @RUNTIME_DIR@/** rw,
# Required by the ldap module:
#include <abstractions/ldapclient>
diff --git a/make/template/config.h b/make/template/config.h
index 28e7dde92..25df02fdc 100644
--- a/make/template/config.h
+++ b/make/template/config.h
@@ -43,6 +43,9 @@
/** The default location that module files are stored in. */
#define INSPIRCD_MODULE_PATH "@MODULE_DIR@"
+/** The default location that runtime files are stored in. */
+#define INSPIRCD_RUNTIME_PATH "@RUNTIME_DIR@"
+
/** The URL of the InspIRCd docs site. */
#define INSPIRCD_DOCS "https://docs.inspircd.org/@VERSION_MAJOR@/"
diff --git a/make/template/inspircd b/make/template/inspircd
index 0150bb994..4b316e0e0 100644
--- a/make/template/inspircd
+++ b/make/template/inspircd
@@ -66,7 +66,7 @@ my $basepath = "@BASE_DIR@";
my $confpath = "@CONFIG_DIR@";
my $binpath = "@BINARY_DIR@";
my $runpath = "@BASE_DIR@";
-my $datadir = "@DATA_DIR@";
+my $runtimedir = "@RUNTIME_DIR@";
my $valgrindlogpath = "$basepath/valgrindlogs";
my $executable = "inspircd";
my $version = "@VERSION_FULL@";
@@ -359,18 +359,6 @@ sub cmd_stop()
# Generic Helper Functions.
###
-# GetPidfile Version 2 - Now With Include Support..
-# I beg for months for include support in insp, then..
-# when it is added, it comes around and BITES ME IN THE ASS,
-# because i then have to code support into this script.. Evil.
-
-# Craig got bitten in the ass again --
-# in 1.1 beta the include file is manditory, therefore
-# if we cant find it, default to %conf%/inspircd.pid.
-# Note, this also contains a fix for when the pid file is
-# defined, but defined in a comment (line starts with #)
-# -- Brain
-
my %filesparsed;
sub getpidfile
@@ -404,7 +392,7 @@ sub getpidfile
if (($i =~ /<pid file=\"(\S+)\">/i) && ($i !~ /^#/))
{
# Set the PID file and return.
- $pidfile = expand_fragment $datadir, $1;
+ $pidfile = expand_fragment $runtimedir, $1;
return;
}
}
@@ -426,7 +414,7 @@ sub getpidfile
}
# End of includes / No includes found. Using default.
- $pidfile = $datadir . "/inspircd.pid";
+ $pidfile = $runtimedir . "/inspircd.pid";
}
sub getstatus {