From 36dc38f361ebb9d57184493e31f45efb097e47fe Mon Sep 17 00:00:00 2001 From: Erik Wilson Date: Sat, 26 Oct 2019 13:11:50 -0700 Subject: [PATCH] Cleanup systemd service file Move command with line continuations to bottom of service file to prevent including systemd directives. Changes After network-online to Wants network-online for air-gap. --- install.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/install.sh b/install.sh index 93079e1e27..cfb7e659ee 100755 --- a/install.sh +++ b/install.sh @@ -578,16 +578,14 @@ create_systemd_service_file() { [Unit] Description=Lightweight Kubernetes Documentation=https://k3s.io -After=network-online.target +Wants=network-online.target + +[Install] +WantedBy=multi-user.target [Service] Type=${SYSTEMD_TYPE} EnvironmentFile=${FILE_K3S_ENV} -ExecStartPre=-/sbin/modprobe br_netfilter -ExecStartPre=-/sbin/modprobe overlay -ExecStart=${BIN_DIR}/k3s \\ - ${CMD_K3S_EXEC} - KillMode=process Delegate=yes LimitNOFILE=infinity @@ -597,9 +595,10 @@ TasksMax=infinity TimeoutStartSec=0 Restart=always RestartSec=5s - -[Install] -WantedBy=multi-user.target +ExecStartPre=-/sbin/modprobe br_netfilter +ExecStartPre=-/sbin/modprobe overlay +ExecStart=${BIN_DIR}/k3s \\ + ${CMD_K3S_EXEC} EOF }