start-smb-windows.sh 736 B

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