rsync: check if source directories in customer repositories exist.
This commit is contained in:
		
							
								
								
									
										11
									
								
								worker.cpp
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								worker.cpp
									
									
									
									
									
								
							@@ -887,8 +887,15 @@ bool Worker::syncCustomerRepositoryAndFS() {
 | 
			
		||||
                                 "--include=*.json        "
 | 
			
		||||
                                 "--include=*.ini");
 | 
			
		||||
            QStringList cmds;
 | 
			
		||||
            cmds << QString("rsync ") + params.simplified() + " etc/ /etc";
 | 
			
		||||
            cmds << QString("rsync ") + params.simplified() + " opt/ /opt";
 | 
			
		||||
 | 
			
		||||
            if (QDir(QDir::cleanPath(m_customerRepository + QDir::separator() + "etc/")).exists()) {
 | 
			
		||||
                cmds << QString("rsync ") + params.simplified() + " etc/ /etc";
 | 
			
		||||
                Utils::printInfoMsg(QString("CONFIGURED SYNCING TO /ETC"));
 | 
			
		||||
            }
 | 
			
		||||
            if (QDir(QDir::cleanPath(m_customerRepository + QDir::separator() + "opt/")).exists()) {
 | 
			
		||||
                cmds << QString("rsync ") + params.simplified() + " opt/ /opt";
 | 
			
		||||
                Utils::printInfoMsg(QString("CONFIGURED SYNCING TO /OPT"));
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            QString cmd;
 | 
			
		||||
            bool error = false;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user