mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-24 03:05:41 +00:00
minor changes
This commit is contained in:
parent
b2f78a4647
commit
31ea86b7a5
2 changed files with 24 additions and 4 deletions
|
|
@ -41,6 +41,25 @@ function onMessage(pConnNum, pSocket){
|
|||
return function(pCommand) {
|
||||
console.log(pCommand);
|
||||
|
||||
if( pCommand.indexOf('cloudcmd') === 0 ){
|
||||
pCommand = pCommand.replace('cloudcmd', '');
|
||||
|
||||
if(pCommand.indexOf(' exit') === 0){
|
||||
pCommand = 'kill -9 ' + process.pid;
|
||||
}
|
||||
else {
|
||||
var lMsg = {
|
||||
stdout : 'cloudcmd exit - for shutdown cloudcmd',
|
||||
stderr : null
|
||||
};
|
||||
|
||||
lMsg = JSON.stringify(lMsg);
|
||||
pSocket.send(lMsg);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* change code page to unicode */
|
||||
if(Win32_b)
|
||||
pCommand = 'chcp 65001 |' + pCommand;
|
||||
|
|
|
|||
|
|
@ -656,13 +656,14 @@ CloudServer.indexReaded = function(pList){
|
|||
if(pError){
|
||||
return console.log(pError);
|
||||
}
|
||||
|
||||
var lWin32 = process.platform === 'win32';
|
||||
|
||||
/* и сохраняем в кэш */
|
||||
CloudServer.Cache.set(CloudServer.INDEX, pIndex);
|
||||
|
||||
pIndex = pIndex.toString();
|
||||
|
||||
var lWin32 = process.platform === 'win32';
|
||||
|
||||
/* если выбрана опция минифизировать скрпиты
|
||||
* меняем в index.html обычные css на
|
||||
* минифицированый
|
||||
|
|
@ -672,7 +673,7 @@ CloudServer.indexReaded = function(pList){
|
|||
if(lWin32)
|
||||
lReplace_s = lReplace_s + '/css/reset.css>';
|
||||
else
|
||||
lReplace_s = lReplace_s + '"/css/reset.css>"';
|
||||
lReplace_s = lReplace_s + '"/css/reset.css">';
|
||||
|
||||
pIndex = pIndex.replace(lReplace_s, '');
|
||||
pIndex = pIndex.replace('/css/style.css', CloudServer.Minify.MinFolder + 'all.min.css');
|
||||
|
|
@ -686,7 +687,7 @@ CloudServer.indexReaded = function(pList){
|
|||
'<title>' + CloudFunc.setTitle() + '</title>');
|
||||
|
||||
if(!CloudServer.Config.appcache){
|
||||
if(!lWin32)
|
||||
if(lWin32)
|
||||
pIndex = pIndex.replace(' manifest=/cloudcmd.appcache', '');
|
||||
else
|
||||
pIndex = pIndex.replace(' manifest="/cloudcmd.appcache"', '');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue