diff options
author | Christian Rößler | 2015-06-11 17:42:55 +0200 |
---|---|---|
committer | Christian Rößler | 2015-06-11 17:42:55 +0200 |
commit | 3c09d285edfb39a0a4f5cfe844e75124fb29b377 (patch) | |
tree | f84e17dce1e0e0d1e6dcb10a2b00f1847ec57ce3 /satellit_installer/includes/10-script_dropper.inc | |
parent | [SSPS] Much better systemd detection (diff) | |
download | setup-scripts-3c09d285edfb39a0a4f5cfe844e75124fb29b377.tar.gz setup-scripts-3c09d285edfb39a0a4f5cfe844e75124fb29b377.tar.xz setup-scripts-3c09d285edfb39a0a4f5cfe844e75124fb29b377.zip |
[SSPS] A tiny little bug (systemd / rc-local)
Diffstat (limited to 'satellit_installer/includes/10-script_dropper.inc')
-rw-r--r-- | satellit_installer/includes/10-script_dropper.inc | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/satellit_installer/includes/10-script_dropper.inc b/satellit_installer/includes/10-script_dropper.inc index 9c7fd5f..e9802ea 100644 --- a/satellit_installer/includes/10-script_dropper.inc +++ b/satellit_installer/includes/10-script_dropper.inc @@ -34,12 +34,23 @@ drop_keychanger_rclocal() { chmod +x /etc/rc.local fi if [ "$SYSTEMD" ]; then - if ! grep -q "WantedBy=multi-user.target" /lib/systemd/system/rc-local.service; then - echo "After=mysql.service" >> /lib/systemd/system/rc-local.service - echo "" >> /lib/systemd/system/rc-local.service - echo "[Install]" >> /lib/systemd/system/rc-local.service - echo "WantedBy=multi-user.target" >> /lib/systemd/system/rc-local.service - fi + cat > /etc/systemd/system/rc-local.service <<-DORTDOK + [Unit] + Description=/etc/rc.local Compatibility + ConditionFileIsExecutable=/etc/rc.local + After=network.target mysql.service + + [Service] + Type=forking + ExecStart=/etc/rc.local start + TimeoutSec=0 + RemainAfterExit=yes + SysVStartPriority=99 + + [Install] + WantedBy=multi-user.target + DORTDOK + systemctl reenable rc-local >/dev/null [ $? -ne 0 ] && echo "Warning - could not enable systemd service rc-local!" fi |