From bf4a83819ed99701d20528d67123c2c6046a6948 Mon Sep 17 00:00:00 2001
From: Michael Friedrich <michael.friedrich@icinga.com>
Date: Mon, 16 Jul 2018 14:22:07 +0200
Subject: [PATCH] Add note on sysconfig shell variables for Systemd to the
 Upgrading docs

refs #6434
---
 doc/16-upgrading-icinga-2.md | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/doc/16-upgrading-icinga-2.md b/doc/16-upgrading-icinga-2.md
index 5f4a2fcef..870b09d69 100644
--- a/doc/16-upgrading-icinga-2.md
+++ b/doc/16-upgrading-icinga-2.md
@@ -24,6 +24,25 @@ numerous false-positive log messages and led to many support questions. v2.9.0
 changes this in the standard way to read these variables from the environment, and use
 sane compile-time defaults.
 
+> **Note**
+>
+> In order to upgrade, remove everything in the sysconfig file and re-apply
+> your changes.
+
+There is a bug with existing sysconfig files where path variables are not expanded
+because Systemd [does not support](https://github.com/systemd/systemd/issues/2123)
+shell variable expansion. This worked with SysVInit though.
+
+Edit the sysconfig file and either remove everything, or edit this line
+on RHEL 7. Modify the path for other distributions.
+
+```
+vim /etc/sysconfig/icinga2
+
+-ICINGA2_PID_FILE=$ICINGA2_RUN_DIR/icinga2/icinga2.pid
++ICINGA2_PID_FILE=/run/icinga2/icinga2.pid
+```
+
 If you want to adjust the number of open files for the Icinga application
 for example, you would just add this setting like this on RHEL 7: