diff --git a/install.sh b/install.sh index abc2774be7..5498e88861 100755 --- a/install.sh +++ b/install.sh @@ -579,16 +579,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 @@ -598,9 +596,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 }