diff --git a/plugins/mariadb/conf/mariadb.sql b/plugins/mariadb/conf/mariadb.sql index 38b822738..1b261184b 100755 --- a/plugins/mariadb/conf/mariadb.sql +++ b/plugins/mariadb/conf/mariadb.sql @@ -26,3 +26,19 @@ CREATE TABLE IF NOT EXISTS `master_replication_user` ( ); +-- 从库配置主库的[ssh private key] +-- drop table `slave_id_rsa`; +CREATE TABLE IF NOT EXISTS `slave_id_rsa` ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT, + `ip` TEXT, + `port` TEXT, + `user` TEXT, + `db_user` TEXT, + `id_rsa` TEXT, + `ps` TEXT, + `addtime` TEXT +); + + + + diff --git a/scripts/install.sh b/scripts/install.sh index 901cc55ba..e5d11d439 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -59,13 +59,17 @@ if [ $OSNAME != "macos" ];then mkdir -p /www/backup/site - # cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"") - # if [ ! -z "$cn" ];then - - # fi + # https://cdn.jsdelivr.net/gh/midoks/mdserver-web@latest/scripts/install.sh if [ ! -d /www/server/mdserver-web ];then - wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master + + cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"") + if [ ! -z "$cn" ];then + wget -O /tmp/master.zip https://gitee.com/midoks/mdserver-web/repository/archive/master.zip + else + wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master + fi + cd /tmp && unzip /tmp/master.zip mv -f /tmp/mdserver-web-master /www/server/mdserver-web rm -rf /tmp/master.zip diff --git a/scripts/update.sh b/scripts/update.sh index dd13727bb..8372a8fa8 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -46,7 +46,10 @@ else OSNAME='unknow' fi + wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master + + cd /tmp && unzip /tmp/master.zip /usr/bin/cp -rf /tmp/mdserver-web-master/* /www/server/mdserver-web rm -rf /tmp/master.zip