-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detach config #74
Detach config #74
Conversation
* Some little improvments
distro/scripts/startup.sh
Outdated
mkdir -p "$USERPROFILE/wsl-vpnkit/" | ||
if [ ! -f "$CONF_PATH" ]; then | ||
cp /app/defaults.conf "$CONF_PATH" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To minimize the changes automatically made by the script to the user's machine, I would rather this to be added as part of the startup text so users could manually create the config file. That will remove the need to care about migrating the config if something ever changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. The main motivation was to separate the evaluated variables from the constants.
Updated as per comments above |
What do you think about change time -f '%e' ash -c "wslpath \$(cmd.exe /V:OFF /C 'echo | set /p t=%USERPROFILE%' 2>/dev/null)"
/mnt/c/Users/psmolkin
0.05
time -f '%e' ash -c "wslpath \$(powershell.exe -NoLogo -NoProfile -c 'Write-Host -NoNewline \$env:USERPROFILE')"
/mnt/c/Users/psmolkin
0.96 Note: |
as well as time -f '%e' taskkill.exe /F /T /IM wsl-vpnkit.exe || :
SUCCESS: The process with PID 9072 (child process of PID 10816) has been terminated.
0.42
time -f '%e' powershell.exe -NoProfile -c 'Stop-Process -Force -Name wsl-vpnkit -ErrorAction SilentlyContinue'
0.97 |
@psmolkin Thanks, those improvements do seem worthwhile too if you want to open a separate PR. |
Hi!
Thanks for a great job firstly!
My little little improvments for this project: