diff --git a/install.sh b/install.sh index c8d6c70..e15aa74 100755 --- a/install.sh +++ b/install.sh @@ -458,10 +458,10 @@ if [ -n "$WSL_DISTRO_NAME" ]; then $SUDO_CMD touch /etc/wsl.conf; fi - SYSTEM_SETTINGS="$(grep -Pzow '\[boot\]\nsystemd\=true' /etc/wsl.conf > /dev/null)"; + #SYSTEM_SETTINGS="$(grep -Pzow '\[boot\]\nsystemd\=true' /etc/wsl.conf 2> /dev/null)"; + SYSTEM_SETTINGS=$(grep -w "systemd=true" /etc/wsl.conf); if [ "$SYSTEM_SETTINGS" == "" ]; then - echo "[boot] -systemd=true" | $SUDO_CMD tee /etc/wsl.conf; + echo -e "[boot]\nsystemd=true" | $SUDO_CMD tee -a /etc/wsl.conf; echo "Not a corresponding wsl configuration has found, conf was modified and need a WSL system restart from Windows terminal"; echo "Do you want to restart the $WSL_DISTRO_NAME system now? (Y/n)";