Remove unit files after disabling, instead of before

Signed-off-by: Martin Norrsken <martin.norrsken@gmail.com>
This commit is contained in:
Martin Norrsken 2021-03-16 23:41:51 +01:00 committed by Brad Davidson
parent 73df65d93a
commit 989b21a0da
1 changed files with 1 additions and 1 deletions

View File

@ -694,9 +694,9 @@ EOF
# --- disable current service if loaded --
systemd_disable() {
$SUDO systemctl disable ${SYSTEM_NAME} >/dev/null 2>&1 || true
$SUDO rm -f /etc/systemd/system/${SERVICE_K3S} || true
$SUDO rm -f /etc/systemd/system/${SERVICE_K3S}.env || true
$SUDO systemctl disable ${SYSTEM_NAME} >/dev/null 2>&1 || true
}
# --- capture current env and create file containing k3s_ variables ---