2015-02-10 14:42:32 +01:00
|
|
|
#!/usr/bin/expect
|
|
|
|
set timeout 10
|
|
|
|
|
2016-01-07 21:44:33 +01:00
|
|
|
set seafile_dir [lindex $argv 0]
|
|
|
|
set server_name [lindex $argv 1]
|
|
|
|
set domain [lindex $argv 2]
|
|
|
|
set seafile_data [lindex $argv 3]
|
|
|
|
set fileserver_port [lindex $argv 4]
|
|
|
|
set db_pwd [lindex $argv 5]
|
2015-02-10 14:42:32 +01:00
|
|
|
|
2016-01-07 21:44:33 +01:00
|
|
|
spawn $seafile_dir/setup-seafile-mysql.sh
|
2015-02-10 14:42:32 +01:00
|
|
|
|
|
|
|
expect "Press ENTER to continue"
|
|
|
|
send "\r";
|
|
|
|
|
|
|
|
expect "What is the name of the server? It will be displayed on the client."
|
|
|
|
send "$server_name\r";
|
|
|
|
|
|
|
|
expect "What is the ip or domain of the server?"
|
|
|
|
send "$domain\r";
|
|
|
|
|
2020-04-28 13:57:07 +02:00
|
|
|
# expect "Where do you want to put your seafile data?"
|
|
|
|
# send "$seafile_data\r";
|
2015-02-10 14:42:32 +01:00
|
|
|
|
|
|
|
expect "Which port do you want to use for the seafile fileserver?"
|
|
|
|
send "$fileserver_port\r";
|
|
|
|
|
|
|
|
expect "Use existing ccnet/seafile/seahub databases"
|
|
|
|
send "2\r";
|
|
|
|
|
|
|
|
expect "What is the host of mysql server?"
|
|
|
|
send "localhost\r";
|
|
|
|
|
|
|
|
expect "What is the port of mysql server?"
|
|
|
|
send "3306\r";
|
|
|
|
|
|
|
|
expect "Which mysql user to use for seafile?"
|
|
|
|
send "seafile\r";
|
|
|
|
|
|
|
|
expect "What is the password for mysql user"
|
|
|
|
send "$db_pwd\r";
|
|
|
|
|
|
|
|
expect "Enter the existing database name for ccnet:"
|
|
|
|
send "ccnetdb\r";
|
|
|
|
|
|
|
|
expect "Enter the existing database name for seafile:"
|
|
|
|
send "seafiledb\r";
|
|
|
|
|
|
|
|
expect "Enter the existing database name for seahub:"
|
|
|
|
send "seahubdb\r";
|
|
|
|
|
|
|
|
expect "Press ENTER to continue, or Ctrl-C to abort"
|
|
|
|
send "\r";
|
|
|
|
|
|
|
|
interact
|
2018-02-12 11:44:01 +01:00
|
|
|
|
|
|
|
wait
|