server/apps/files_external/tests/env/start-smb-windows.sh

40 lines
736 B
Bash
Raw Normal View History

2015-09-27 11:03:31 +00:00
#!/usr/bin/env bash
#
# ownCloud
#
# Set environment variable DEBUG to print config file
#
# @author Thomas Müller
# @copyright 2015 Thomas Müller <deepdiver@owncloud.com>
#
# retrieve current folder to place the config in the parent folder
2015-04-28 09:17:46 +00:00
thisFolder=`echo $0 | sed 's#env/start-smb-windows\.sh##'`
if [ -z "$thisFolder" ]; then
thisFolder="."
fi;
user=smb-test
password=!owncloud123
host=WIN-9GTFAS08C15
2015-12-09 11:18:51 +00:00
if ! "$thisFolder"/env/wait-for-connection ${host} 445; then
echo "[ERROR] Server not reachable" >&2
exit 1
fi
cat > $thisFolder/config.smb.php <<DELIM
<?php
return array(
'run'=>true,
'host'=>'$host',
'user'=>'$user',
'password'=>'$password',
'share'=>'oc-test',
'root'=>'',
);
DELIM