start-smb-windows.sh 727 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/usr/bin/env bash
  2. #
  3. # SPDX-FileCopyrightText: 2015 ownCloud, Inc.
  4. # SPDX-License-Identifier: AGPL-3.0-only
  5. #
  6. # Set environment variable DEBUG to print config file
  7. #
  8. # retrieve current folder to place the config in the parent folder
  9. thisFolder=`echo $0 | sed 's#env/start-smb-windows\.sh##'`
  10. if [ -z "$thisFolder" ]; then
  11. thisFolder="."
  12. fi;
  13. user=smb-test
  14. password=!owncloud123
  15. host=WIN-9GTFAS08C15
  16. if ! "$thisFolder"/env/wait-for-connection ${host} 445; then
  17. echo "[ERROR] Server not reachable" >&2
  18. exit 1
  19. fi
  20. cat > $thisFolder/config.smb.php <<DELIM
  21. <?php
  22. return array(
  23. 'run'=>true,
  24. 'host'=>'$host',
  25. 'user'=>'$user',
  26. 'password'=>'$password',
  27. 'share'=>'oc-test',
  28. 'root'=>'',
  29. );
  30. DELIM