2015-02-20 15:07:18 +01:00
|
|
|
#!/usr/bin/expect
|
|
|
|
set timeout 10
|
|
|
|
|
2016-01-07 21:44:33 +01:00
|
|
|
set seafile_dir [lindex $argv 0]
|
|
|
|
set admin_email [lindex $argv 1]
|
|
|
|
set admin_password [lindex $argv 2]
|
2015-02-20 15:07:18 +01:00
|
|
|
|
2016-01-07 21:44:33 +01:00
|
|
|
spawn $seafile_dir/seahub.sh start-fastcgi
|
2015-02-20 15:07:18 +01:00
|
|
|
|
|
|
|
expect "for the admin account?"
|
|
|
|
send "$admin_email\r";
|
|
|
|
|
|
|
|
expect "for the admin account?"
|
2018-01-30 11:32:02 +01:00
|
|
|
send {__ADMIN_PASSWORD__};
|
|
|
|
send '\r';
|
2015-02-20 15:07:18 +01:00
|
|
|
|
|
|
|
expect "Enter the"
|
2018-01-30 11:32:02 +01:00
|
|
|
send {__ADMIN_PASSWORD__};
|
|
|
|
send '\r';
|
2015-02-20 15:07:18 +01:00
|
|
|
|
|
|
|
interact
|