aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-06-12 21:40:01 +0100
committerGravatar Sadie Powell2026-06-12 21:40:01 +0100
commitc6aae66443bf674086f0dcd0f1d16518695453e9 (patch)
treee38e7f38d25c1e8858fc102242ca5ae8ebd22324 /src/scripts
parentImprove the advice in the help file. (diff)
Fix some oversights from 425dbe19.
Diffstat (limited to 'src/scripts')
-rw-r--r--src/scripts/deploy-tls.sh.in9
-rw-r--r--src/scripts/inspircd.openrc.in4
-rw-r--r--src/scripts/logrotate.in4
-rw-r--r--src/scripts/org.inspircd.plist.in10
4 files changed, 20 insertions, 7 deletions
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 @@
<string>@ABSOLUTE_LOG_DIR@/launchd-stdout.log</string>
<key>StandardErrorPath</key>
<string>@ABSOLUTE_LOG_DIR@/launchd-stderr.log</string>
- %ifndef DISABLE_OWNERSHIP <key>UserName</key>
- %ifndef DISABLE_OWNERSHIP <string>@USER_NAME@</string>
- %ifndef DISABLE_OWNERSHIP <key>GroupName</key>
- %ifndef DISABLE_OWNERSHIP <string>@GROUP_NAME@</string>
+#cmakeifndef DISABLE_OWNERSHIP
+ <key>UserName</key>
+ <string>@USER_NAME@</string>
+ <key>GroupName</key>
+ <string>@GROUP_NAME@</string>
+#cmakeendif
</dict>
</plist>