Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,24 @@ public function __construct() {
$this->certs_dir = EE_ROOT_DIR . '/services/nginx-proxy/certs';
$this->key_path = $this->certs_dir . '/default.key';
$this->crt_path = $this->certs_dir . '/default.crt';

if ( ! $this->fs->exists( $this->certs_dir ) ) {
$this->skip_this_migration = true;
}
}

/**
* Generate default self-signed cert if not present.
* @throws EE\ExitException
*/
public function up() {

if ( $this->skip_this_migration ) {
EE::debug( 'Skipping default self-signed cert generation migration as it is not needed.' );

return;
}

if ( $this->fs->exists( $this->key_path ) && $this->fs->exists( $this->crt_path ) ) {
EE::debug( 'Default self-signed cert already exists. Skipping generation.' );

Expand Down
Loading