Fix Seafile script missing admin account creation (#2)
* Fix missing admin account creation * Update seafile-install.sh
This commit is contained in:
parent
ea801f7eca
commit
736c3a9cff
@ -33,7 +33,7 @@ SEAHUB_DB="seahub_db"
|
|||||||
DB_USER="seafile"
|
DB_USER="seafile"
|
||||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
|
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
|
||||||
ADMIN_EMAIL="admin@localhost.local"
|
ADMIN_EMAIL="admin@localhost.local"
|
||||||
ADMIN_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
|
ADMIN_PASS="helper-scripts"
|
||||||
sudo -u mysql mysql -s -e "CREATE DATABASE $CCNET_DB CHARACTER SET utf8;"
|
sudo -u mysql mysql -s -e "CREATE DATABASE $CCNET_DB CHARACTER SET utf8;"
|
||||||
sudo -u mysql mysql -s -e "CREATE DATABASE $SEAFILE_DB CHARACTER SET utf8;"
|
sudo -u mysql mysql -s -e "CREATE DATABASE $SEAFILE_DB CHARACTER SET utf8;"
|
||||||
sudo -u mysql mysql -s -e "CREATE DATABASE $SEAHUB_DB CHARACTER SET utf8;"
|
sudo -u mysql mysql -s -e "CREATE DATABASE $SEAHUB_DB CHARACTER SET utf8;"
|
||||||
@ -189,28 +189,28 @@ sed -i "0,/127.0.0.1/s/127.0.0.1/0.0.0.0/" /opt/seafile/conf/gunicorn.conf.py
|
|||||||
msg_ok "Conf files adjusted"
|
msg_ok "Conf files adjusted"
|
||||||
|
|
||||||
msg_info "Setting up Seafile"
|
msg_info "Setting up Seafile"
|
||||||
$STD su - seafile -c "bash /opt/seafile/seafile-server-latest/seafile.sh start"
|
$STD su - seafile -c "/opt/seafile/seafile-server-latest/seafile.sh start"
|
||||||
$STD su - seafile -c "expect <<EOF
|
$STD su - seafile -c "expect <<EOF
|
||||||
spawn bash /opt/seafile/seafile-server-latest/seahub.sh start
|
spawn /opt/seafile/seafile-server-latest/seahub.sh start
|
||||||
expect {
|
expect {
|
||||||
\"What is the email for the admin account\" {
|
\"email\" {
|
||||||
send \"$ADMIN_EMAIL\r\"
|
send \"admin@localhost.local\r\"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
expect {
|
expect {
|
||||||
\"What is the password for the admin account\" {
|
\"password\" {
|
||||||
send \"$ADMIN_PASS\r\"
|
send \"helper-scripts\r\"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
expect {
|
expect {
|
||||||
\"Enter the password again:\" {
|
\"password again\" {
|
||||||
send \"$ADMIN_PASS\r\"
|
send \"helper-scripts\r\"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
expect eof
|
expect eof
|
||||||
EOF"
|
EOF"
|
||||||
$STD su - seafile -c "bash /opt/seafile/seafile-server-latest/seahub.sh stop"
|
$STD su - seafile -c "/opt/seafile/seafile-server-latest/seahub.sh stop"
|
||||||
$STD su - seafile -c "bash /opt/seafile/seafile-server-latest/seafile.sh stop"
|
$STD su - seafile -c "/opt/seafile/seafile-server-latest/seafile.sh stop"
|
||||||
msg_ok "Seafile setup"
|
msg_ok "Seafile setup"
|
||||||
|
|
||||||
msg_info "Creating Services"
|
msg_info "Creating Services"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user