diff --git a/entrypoint.sh b/entrypoint.sh index 09ac455..873e37c 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -40,11 +40,11 @@ if [ "$ADDITIONALS" == "true" ]; then sh /additional_install.sh echo "Additional install has finished" elif [ -n "$WSL_DISTRO_NAME" ]; then - echo "WSL2 systemd script has started" - sh /wsl2-systemd-script.sh - #systemctl - echo "WSL2 systemd script has finished" -else + echo "Download WSL2 systemd scripts" + cp -rv /wsl2-systemd-script.sh /usr/local/bin/wsl2-systemd-script.sh + cp -rv /enter-systemd-namespace /usr/local/bin/enter-systemd-namespace + cp -rv /wsl2-systemd-script.sh /usr/local/bin/start-systemd-namespace +else # default install if [[ "$SMARTHOST_PROXY" == "YES" || "$SMARTHOST_PROXY" == "TRUE" ]]; then PROXY_TYPE=smarthost-proxy" "$PROXY_TYPE; fi diff --git a/install.sh b/install.sh index ec90d38..bd245cc 100755 --- a/install.sh +++ b/install.sh @@ -661,8 +661,12 @@ if [ -n "$WSL_DISTRO_NAME" ]; then --volume $HOME/.ssh/installer:/root/.ssh/id_rsa \ --volume /etc/user/:/etc/user/ \ --volume /etc/system/:/etc/system/ \ + --volume /usr/local/bin/:/usr/local/bin/ \ registry.format.hu/installer-tool fi; + + sh /usr/local/bin/wsl2-systemd-script.sh + #systemctl fi; shopt -s expand_aliases