2
0

reload.bat 511 B

123456789101112131415161718192021
  1. @echo off
  2. set "CURR_PATH=%~dp0"
  3. set "STARTUP_PATH=%userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
  4. FOR /F %%i IN ('wsl pwd') DO @set DIR_IN_WSL=%%i
  5. wsl sudo cp -avf %DIR_IN_WSL%/../../etc/smartdns/* /etc/smartdns/
  6. IF NOT %ERRORLEVEL% == 0 (
  7. echo copy smartdns configuration file failed.
  8. pause
  9. exit 1
  10. )
  11. wsl sudo /etc/init.d/smartdns restart
  12. IF NOT %ERRORLEVEL% == 0 (
  13. echo reload smartdns failed.
  14. pause
  15. exit 1
  16. )
  17. echo reload smartdns success
  18. pause