Magellan Linux

Diff of /alx-src/branches/alx-web-060/include/common-functions.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2591 by niro, Wed Jun 15 14:19:07 2011 UTC revision 2592 by niro, Tue Jul 5 15:24:46 2011 UTC
# Line 53  function ssh_editvar($var, $value, $file Line 53  function ssh_editvar($var, $value, $file
53   global $ip;   global $ip;
54    
55   // sed cmd: ssh -l root 10.11.12.13 'sed -i -e "s|^\(VAR=\).*|\1\"VALUE\"| FILE'   // sed cmd: ssh -l root 10.11.12.13 'sed -i -e "s|^\(VAR=\).*|\1\"VALUE\"| FILE'
56   sshdo('if [[ ! -z $(grep "^'.$var.'=" '.file.') ]]; then sed -i -e "s|^\('.$var.'=\).*|\1\"'.$value.'\"|" '.$file. 'else echo "'.$var.'=\"'.$value.'\"" >> '.file, $ip);   sshdo('if [[ ! -z $(grep "^'.$var.'=" '.$file.') ]]; then sed -i -e "s|^\('.$var.'=\).*|\1\"'.$value.'\"|" '.$file. 'else echo "'.$var.'=\"'.$value.'\"" >> '.file, $ip);
57  }  }
58    
59  function online($ip)  function online($ip)

Legend:
Removed from v.2591  
changed lines
  Added in v.2592