ftimme
2012-05-30 2cb1563f63386b35a69e460051aa9b4a2851d104
server/cron_daily.php
@@ -180,7 +180,7 @@
   
   if(is_file($awstats_website_conf_file)) unlink($awstats_website_conf_file);
   
   $sql = "SELECT domain FROM web_domain WHERE (type = 'alias' OR type = 'subdomain') AND server_id = ".$conf['server_id'];
   $sql = "SELECT domain FROM web_domain WHERE (type = 'alias' OR type = 'subdomain') AND parent_domain_id = ".$rec['domain_id'];
   $aliases = $app->db->queryAllRecords($sql);
   $aliasdomain = '';
   
@@ -194,7 +194,7 @@
      $awstats_conf_file_content = 'Include "'.$awstats_conf_dir.'/awstats.conf"
LogFile="/var/log/ispconfig/httpd/'.$domain.'/yesterday-access.log"
SiteDomain="'.$domain.'"
HostAliases="www.'.$domain.' localhost 127.0.0.1"'.$aliasdomain;
HostAliases="www.'.$domain.' localhost 127.0.0.1'.$aliasdomain.'"';
      file_put_contents($awstats_website_conf_file,$awstats_conf_file_content);
   }
   
@@ -525,8 +525,8 @@
            if($backup_mode == 'userzip') {
               //* Create a .zip backup as web user and include also files owned by apache / nginx user
               $web_backup_file = 'web'.$web_id.'_'.date('Y-m-d_H-i').'.zip';
               exec('cd '.escapeshellarg($web_path).' && sudo -u '.escapeshellarg($web_user).' find . -group '.escapeshellarg($web_group).' -print 2> /dev/null | zip --exclude=backup\* --symlinks '.escapeshellarg($web_backup_dir.'/'.$web_backup_file).' -@');
               exec('cd '.escapeshellarg($web_path).' && sudo -u '.escapeshellarg($web_user).' find . -user '.escapeshellarg($http_server_user).' -print 2> /dev/null | zip --exclude=backup\* --update --symlinks '.escapeshellarg($web_backup_dir.'/'.$web_backup_file).' -@');
               exec('cd '.escapeshellarg($web_path).' && sudo -u '.escapeshellarg($web_user).' find . -group '.escapeshellarg($web_group).' -print 2> /dev/null | zip -b /tmp --exclude=backup\* --symlinks '.escapeshellarg($web_backup_dir.'/'.$web_backup_file).' -@');
               exec('cd '.escapeshellarg($web_path).' && sudo -u '.escapeshellarg($web_user).' find . -user '.escapeshellarg($http_server_user).' -print 2> /dev/null | zip -b /tmp --exclude=backup\* --update --symlinks '.escapeshellarg($web_backup_dir.'/'.$web_backup_file).' -@');
            } else {
               //* Create a tar.gz backup as root user
               $web_backup_file = 'web'.$web_id.'_'.date('Y-m-d_H-i').'.tar.gz';