github.com/observiq/bindplane-agent@v1.51.0/windows/install/generate-manager-yaml.bat (about) 1 @echo off 2 setlocal 3 4 set "install_dir=%~1" 5 set "endpoint=%~2" 6 set "secret_key=%~3" 7 set "labels=%~4" 8 9 echo %install_dir% 10 echo %endpoint% 11 echo %secret_key% 12 echo %labels% 13 14 if "%endpoint%"=="" ( 15 echo Endpoint not specified; Not writing output yaml 16 exit /b 0 17 ) 18 19 set "managerfile=%install_dir%manager.yaml" 20 21 echo Writing manager yaml 22 set "endpointField=endpoint: "%endpoint%"" 23 set "secretField=secret_key: "%secret_key%"" 24 set "labelsField=labels: "%labels%"" 25 26 echo %endpointField% >"%managerfile%" 27 if not "%secret_key%"=="" ( 28 echo %secretField% >>"%managerfile%" 29 ) 30 if not "%labels%"=="" ( 31 echo %labelsField% >>"%managerfile%" 32 ) 33 34 35 endlocal