Skip to content

Commit

Permalink
Merge pull request #345 from like-it/develop
Browse files Browse the repository at this point in the history
Update Function_domain_add.php
  • Loading branch information
remco-pc authored Nov 9, 2022
2 parents 432f9ac + a90c0bb commit cdd2e45
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Cli/Configure/Plugin/Function_domain_add.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ function function_domain_add(Parse $parse, Data $data, $domain=''){
try {
File::write($url, Core::object($route->data(), Core::OBJECT_JSON));
File::chmod($url, 0666);
Core::execute('chown www-data:www-data -R ' . $host_dir_root);
Core::execute('chmod 777 -R ' . $host_dir_root);
} catch (Exception | FileWriteException | ObjectException $exception){
return $exception->getMessage() . PHP_EOL;
}
Expand Down Expand Up @@ -241,11 +243,11 @@ function function_domain_add(Parse $parse, Data $data, $domain=''){
try {
File::write($url, Core::object($route->data(), Core::OBJECT_JSON));
File::chmod($url, 0666);
Core::execute('chown www-data:www-data -R ' . $host_dir_root);
Core::execute('chmod 777 -R ' . $host_dir_root);
} catch (Exception | FileWriteException | ObjectException $exception){
return $exception->getMessage() . "\n";
}
}
Core::execute('chown www-data:www-data -R ' . $host_dir_root);
Core::execute('chmod 777 -R ' . $host_dir_root);
}

0 comments on commit cdd2e45

Please sign in to comment.