diff --git a/install.sh b/install.sh index 79f73e4..87ba1d0 100755 --- a/install.sh +++ b/install.sh @@ -108,7 +108,18 @@ check_dirs_and_files() { else chmod 0600 $HOME/.ssh/installer; chmod 0600 $HOME/.ssh/installer.pub; - fi; + fi; + + if [ ! -f /etc/wsl.conf ]; then + $SUDO_CMD touch /etc/wsl.conf; + fi + + SYSTEM_SETTINGS=$($SUDO_CMD grep -Pzow '\[boot\]\nsystemd\=true' /etc/wsl.conf); + if [ "$SYSTEM_SETTINGS" == "" ]; then + $SUDO_CMD echo "[boot] +systemd=true" >> /etc/wsl.conf; + echo "Not corresponding wsl configuration found, modified and need a WSL system restart from Windows terminal"; + fi if [ ! -d "/etc/user/config" ]; then $SUDO_CMD mkdir -p "/etc/user/config"