File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,24 @@ public function __construct() {
1616 $ this ->certs_dir = EE_ROOT_DIR . '/services/nginx-proxy/certs ' ;
1717 $ this ->key_path = $ this ->certs_dir . '/default.key ' ;
1818 $ this ->crt_path = $ this ->certs_dir . '/default.crt ' ;
19+
20+ if ( ! $ this ->fs ->exists ( $ this ->certs_dir ) ) {
21+ $ this ->skip_this_migration = true ;
22+ }
1923 }
2024
2125 /**
2226 * Generate default self-signed cert if not present.
2327 * @throws EE\ExitException
2428 */
2529 public function up () {
30+
31+ if ( $ this ->skip_this_migration ) {
32+ EE ::debug ( 'Skipping default self-signed cert generation migration as it is not needed. ' );
33+
34+ return ;
35+ }
36+
2637 if ( $ this ->fs ->exists ( $ this ->key_path ) && $ this ->fs ->exists ( $ this ->crt_path ) ) {
2738 EE ::debug ( 'Default self-signed cert already exists. Skipping generation. ' );
2839
You can’t perform that action at this time.
0 commit comments