From c6aae66443bf674086f0dcd0f1d16518695453e9 Mon Sep 17 00:00:00 2001
From: Sadie Powell
Date: Fri, 12 Jun 2026 21:40:01 +0100
Subject: Fix some oversights from 425dbe19.
---
src/scripts/deploy-tls.sh.in | 9 ++++++++-
src/scripts/inspircd.openrc.in | 4 +++-
src/scripts/logrotate.in | 4 +++-
src/scripts/org.inspircd.plist.in | 10 ++++++----
4 files changed, 20 insertions(+), 7 deletions(-)
(limited to 'src/scripts')
diff --git a/src/scripts/deploy-tls.sh.in b/src/scripts/deploy-tls.sh.in
index ed06a0168..220eb8ddc 100644
--- a/src/scripts/deploy-tls.sh.in
+++ b/src/scripts/deploy-tls.sh.in
@@ -15,13 +15,20 @@ INSPIRCD_CONFIG_DIR="@ABSOLUTE_CONFIG_DIR@"
INSPIRCD_PID_FILE="@ABSOLUTE_RUNTIME_DIR@/inspircd.pid"
# The user:group that InspIRCd runs as.
+#cmakeifdef DISABLE_OWNERSHIP
+INSPIRCD_OWNER=""
+#cmakeelse
INSPIRCD_OWNER="@USER_NAME@:@GROUP_NAME@"
+#cmakeendif
if [ -e ${CERT_DIR} -a -e ${INSPIRCD_CONFIG_DIR} ]
then
cp "${CERT_DIR}/fullchain.pem" "${INSPIRCD_CONFIG_DIR}/cert.pem"
cp "${CERT_DIR}/privkey.pem" "${INSPIRCD_CONFIG_DIR}/key.pem"
- chown ${INSPIRCD_OWNER} "${INSPIRCD_CONFIG_DIR}/cert.pem" "${INSPIRCD_CONFIG_DIR}/key.pem"
+ if [ -n "${INSPIRCD_OWNER}" ]
+ then
+ chown ${INSPIRCD_OWNER} "${INSPIRCD_CONFIG_DIR}/cert.pem" "${INSPIRCD_CONFIG_DIR}/key.pem"
+ fi
if [ -r ${INSPIRCD_PID_FILE} ]
then
diff --git a/src/scripts/inspircd.openrc.in b/src/scripts/inspircd.openrc.in
index 1422a1c64..20a78032c 100644
--- a/src/scripts/inspircd.openrc.in
+++ b/src/scripts/inspircd.openrc.in
@@ -22,7 +22,9 @@ description="InspIRCd - Internet Relay Chat Daemon"
command="@ABSOLUTE_BINARY_DIR@/inspircd"
command_args="--nofork --nopid"
-%ifndef DISABLE_OWNERSHIP command_user="@USER_NAME@:@GROUP_NAME@"
+#cmakeifndef DISABLE_OWNERSHIP
+command_user="@USER_NAME@:@GROUP_NAME@"
+#cmakeendif
pidfile="@ABSOLUTE_RUNTIME_DIR@/${RC_SVCNAME}.pid"
supervisor="supervise-daemon"
diff --git a/src/scripts/logrotate.in b/src/scripts/logrotate.in
index 208a28184..e7e5b271d 100644
--- a/src/scripts/logrotate.in
+++ b/src/scripts/logrotate.in
@@ -21,7 +21,9 @@
@ABSOLUTE_LOG_DIR@/*.log {
compress
- %ifndef DISABLE_OWNERSHIP create 0644 @USER_NAME@ @GROUP_NAME@
+#cmakeifndef DISABLE_OWNERSHIP
+ create 0644 @USER_NAME@ @GROUP_NAME@
+#cmakeendif
dateext
delaycompress
missingok
diff --git a/src/scripts/org.inspircd.plist.in b/src/scripts/org.inspircd.plist.in
index 60de7c1ac..bcfa1f1e1 100644
--- a/src/scripts/org.inspircd.plist.in
+++ b/src/scripts/org.inspircd.plist.in
@@ -25,9 +25,11 @@
@ABSOLUTE_LOG_DIR@/launchd-stdout.log
StandardErrorPath
@ABSOLUTE_LOG_DIR@/launchd-stderr.log
- %ifndef DISABLE_OWNERSHIP UserName
- %ifndef DISABLE_OWNERSHIP @USER_NAME@
- %ifndef DISABLE_OWNERSHIP GroupName
- %ifndef DISABLE_OWNERSHIP @GROUP_NAME@
+#cmakeifndef DISABLE_OWNERSHIP
+ UserName
+ @USER_NAME@
+ GroupName
+ @GROUP_NAME@
+#cmakeendif
--
cgit v1.3.1-10-gc9f91