mirror of
https://github.com/easy-wi/developer.git
synced 2025-02-20 11:23:28 +08:00
#662 image server at installer and no hard code
This commit is contained in:
parent
cb8b5f4b32
commit
eb20f24976
@ -215,11 +215,7 @@ class masterServer {
|
|||||||
$imageServer = $this->getPreferdImageServer($preferedServer, $ftpServers);
|
$imageServer = $this->getPreferdImageServer($preferedServer, $ftpServers);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($imageServer) or !$imageServer) {
|
if (!isset($imageServer) or !$imageServer or $this->updates == 2) {
|
||||||
$imageServer = 'easywi';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->updates == 2) {
|
|
||||||
$imageServer = 'none';
|
$imageServer = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -255,17 +251,7 @@ class masterServer {
|
|||||||
$this->shellScript .= 'BOMRM="sed \"\'s/^\xef\xbb\xbf//g\'\""' . "\n";
|
$this->shellScript .= 'BOMRM="sed \"\'s/^\xef\xbb\xbf//g\'\""' . "\n";
|
||||||
$this->shellScript .= 'PATTERN="\.log\|\.txt\|\.cfg\|\.vdf\|\.db\|\.dat\|\.ztmp\|\.blib\|log\/\|logs\/\|downloads\/\|DownloadLists\/\|metamod\/\|amxmodx\/\|hl\/\|hl2\/\|cfg\/\|addons\/\|bin\/\|classes/"' . "\n";
|
$this->shellScript .= 'PATTERN="\.log\|\.txt\|\.cfg\|\.vdf\|\.db\|\.dat\|\.ztmp\|\.blib\|log\/\|logs\/\|downloads\/\|DownloadLists\/\|metamod\/\|amxmodx\/\|hl\/\|hl2\/\|cfg\/\|addons\/\|bin\/\|classes/"' . "\n";
|
||||||
|
|
||||||
if ($this->imageserver == 'easywi') {
|
if ($this->imageserver != 'none') {
|
||||||
|
|
||||||
$this->shellScript .= 'if [ "`which rsync`" != "" ]; then' . "\n";
|
|
||||||
$this->shellScript .= 'SYNCTOOL="rsync"' . "\n";
|
|
||||||
$this->shellScript .= 'SYNCCMD="rsync -azuvx 84.200.78.232::easy-wi"' . "\n";
|
|
||||||
$this->shellScript .= 'else' . "\n";
|
|
||||||
$this->shellScript .= 'SYNCTOOL="wget"' . "\n";
|
|
||||||
$this->shellScript .= 'SYNCCMD="wget -r -N -l inf -nH --no-check-certificate --cut-dirs=1 ftp://imageuser:BMpRP4HEORkKGj@84.200.78.232"' . "\n";
|
|
||||||
$this->shellScript .= 'fi' . "\n";
|
|
||||||
|
|
||||||
} else if ($this->imageserver != 'none') {
|
|
||||||
|
|
||||||
$this->shellScript .= 'if [ "`which rsync`" != "" -a "`echo ' . $this->imageserver . ' | grep -E \'^ftp(s|)\:(.*)\'`" == "" ]; then' . "\n";
|
$this->shellScript .= 'if [ "`which rsync`" != "" -a "`echo ' . $this->imageserver . ' | grep -E \'^ftp(s|)\:(.*)\'`" == "" ]; then' . "\n";
|
||||||
$this->shellScript .= 'SYNCTOOL="rsync"' . "\n";
|
$this->shellScript .= 'SYNCTOOL="rsync"' . "\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user