Commit 8eef01e 1 parent 201dbbf commit 8eef01e Copy full SHA for 8eef01e
File tree 2 files changed +16
-2
lines changed
2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,10 @@ module.exports = [{
84
84
name : 'dbname' ,
85
85
description : 'Database name' ,
86
86
configPath : 'database.connection.database'
87
+ } , {
88
+ name : 'sslemail' ,
89
+ description : 'SSL email address' ,
90
+ configPath : 'ssl.email'
87
91
} , {
88
92
name : 'auth' ,
89
93
description : 'Type of authentication to use' ,
Original file line number Diff line number Diff line change @@ -73,10 +73,20 @@ class NginxService extends BaseService {
73
73
} ) ;
74
74
}
75
75
76
- let answers ;
77
76
let ghostExec = process . argv . slice ( 0 , 2 ) . join ( ' ' ) ;
77
+ let answerPromise ;
78
+ let answers ;
79
+
80
+ if ( this . config . get ( 'ssl.email' , false ) ) {
81
+ answerPromise = Promise . resolve ( {
82
+ ssl : true ,
83
+ email : this . config . get ( 'ssl.email' )
84
+ } ) ;
85
+ } else {
86
+ answerPromise = this . ui . prompt ( prompts ) ;
87
+ }
78
88
79
- return this . ui . prompt ( prompts ) . then ( ( _answers ) => {
89
+ return answerPromise . then ( ( _answers ) => {
80
90
answers = _answers ;
81
91
82
92
return this . ui . noSpin ( execa . shell ( `sudo ${ ghostExec } service nginx-conf${ ! answers . ssl ? ' no-ssl' : '' } ` , { stdio : 'inherit' } ) ) . catch ( ( error ) => {
You can’t perform that action at this time.
0 commit comments