Example #1
0
 /**
  * @param LeConfigData $data
  */
 public function init(LeConfigData $data)
 {
     exec('mkdir ' . $this->getAppDir());
     exec('chmod 777 -Rf ' . $this->getAppDir());
     exec('mkdir ' . $this->getConfigDir());
     $owner = $data->getLdapOwner();
     $group = $data->getLdapOwner();
     if (!empty($owner) && !empty($group)) {
         exec('chown -Rf ' . $owner . ':' . $group . ' ' . $this->getAppDir());
     }
 }
Example #2
0
 public function initConfigClass(LeConfigData $data)
 {
     $classPathAndName = $this->getConfigDir() . $this->getClassFileName();
     exec("cp src/Leroy/LePackage/Config/Templates/{$this->getClassFileName()} {$classPathAndName}");
     exec("chmod 775 {$classPathAndName}");
     $owner = $data->getLdapOwner();
     $group = $data->getLdapOwner();
     if (!empty($owner) && !empty($group)) {
         exec('chown -Rf ' . $owner . ':' . $group . ' ' . $classPathAndName);
     }
 }