@@ -99,14 +99,14 @@ var installCmd = &cobra.Command{
99
99
// Step 4: Configure Nginx
100
100
network .ConfigureNginx ()
101
101
102
- // Setp 5: Create relay user
102
+ // Step 5: Create relay user
103
103
spinner , _ := pterm .DefaultSpinner .Start (fmt .Sprintf ("Checking if '%s' user exists..." , relays .User ))
104
104
if ! users .UserExists (relays .User ) {
105
105
spinner .UpdateText (fmt .Sprintf ("Creating '%s' user..." , relays .User ))
106
106
users .CreateUser (relays .User , true )
107
- spinner .Success (fmt .Sprintf ("Created '%s' user. " , relays .User ))
107
+ spinner .Success (fmt .Sprintf ("Created '%s' user" , relays .User ))
108
108
} else {
109
- spinner .Success (fmt .Sprintf ("'%s' user already exists. " , relays .User ))
109
+ spinner .Success (fmt .Sprintf ("'%s' user already exists" , relays .User ))
110
110
}
111
111
112
112
if selectedRelayOption == khatru_pyramid .RelayName {
@@ -123,10 +123,16 @@ var installCmd = &cobra.Command{
123
123
// Step 9: Download and install the relay binary
124
124
khatru_pyramid .InstallRelayBinary (pubKey )
125
125
126
- // Step 10: Set up the relay service
127
- khatru_pyramid .SetupRelayService ( relayDomain , pubKey , relayContact )
126
+ // Step 10: Set up the relay data directory
127
+ khatru_pyramid .SetUpRelayDataDir ( )
128
128
129
- // Step 11: Show success messages
129
+ // Step 11: Configure the relay
130
+ khatru_pyramid .ConfigureRelay (relayDomain , pubKey , relayContact )
131
+
132
+ // Step 12: Set up the relay service
133
+ khatru_pyramid .SetUpRelayService ()
134
+
135
+ // Step 13: Show success messages
130
136
khatru_pyramid .SuccessMessages (relayDomain , httpsEnabled )
131
137
} else if selectedRelayOption == nostr_rs_relay .RelayName {
132
138
// Step 6: Configure Nginx for HTTP
@@ -142,10 +148,16 @@ var installCmd = &cobra.Command{
142
148
// Step 9: Download and install the relay binary
143
149
nostr_rs_relay .InstallRelayBinary ()
144
150
145
- // Step 10: Set up the relay service
146
- nostr_rs_relay .SetupRelayService (relayDomain , pubKey , relayContact , httpsEnabled )
151
+ // Step 10: Set up the relay data directory
152
+ nostr_rs_relay .SetUpRelayDataDir ()
153
+
154
+ // Step 11: Configure the relay
155
+ nostr_rs_relay .ConfigureRelay (relayDomain , pubKey , relayContact , httpsEnabled )
156
+
157
+ // Step 12: Set up the relay service
158
+ nostr_rs_relay .SetUpRelayService ()
147
159
148
- // Step 11 : Show success messages
160
+ // Step 13 : Show success messages
149
161
nostr_rs_relay .SuccessMessages (relayDomain , httpsEnabled )
150
162
} else if selectedRelayOption == strfry .RelayName {
151
163
// Step 6: Configure Nginx for HTTP
@@ -161,10 +173,16 @@ var installCmd = &cobra.Command{
161
173
// Step 9: Download and install the relay binary
162
174
strfry .InstallRelayBinary ()
163
175
164
- // Step 10: Set up the relay service
165
- strfry .SetupRelayService ( relayDomain , pubKey , relayContact )
176
+ // Step 10: Set up the relay data directory
177
+ strfry .SetUpRelayDataDir ( )
166
178
167
- // Step 11: Show success messages
179
+ // Step 11: Configure the relay
180
+ strfry .ConfigureRelay (pubKey , relayContact )
181
+
182
+ // Step 12: Set up the relay service
183
+ strfry .SetUpRelayService ()
184
+
185
+ // Step 13: Show success messages
168
186
strfry .SuccessMessages (relayDomain , httpsEnabled )
169
187
} else if selectedRelayOption == wot_relay .RelayName {
170
188
// Step 6: Configure Nginx for HTTP
@@ -180,10 +198,19 @@ var installCmd = &cobra.Command{
180
198
// Step 9: Download and install the relay binary
181
199
wot_relay .InstallRelayBinary (pubKey )
182
200
183
- // Step 10: Set up the relay service
184
- wot_relay .SetupRelayService (relayDomain , pubKey , relayContact , httpsEnabled )
201
+ // Step 10: Set up the relay data directory
202
+ wot_relay .SetUpRelayDataDir ()
203
+
204
+ // Step 11: Configure the relay
205
+ wot_relay .ConfigureRelay (relayDomain , pubKey , relayContact , httpsEnabled )
185
206
186
- // Step 11: Show success messages
207
+ // Step 12: Set up the relay site
208
+ wot_relay .SetUpRelaySite (relayDomain )
209
+
210
+ // Step 13: Set up the relay service
211
+ wot_relay .SetUpRelayService ()
212
+
213
+ // Step 14: Show success messages
187
214
wot_relay .SuccessMessages (relayDomain , httpsEnabled )
188
215
} else if selectedRelayOption == khatru29 .RelayName {
189
216
// Step 6: Configure Nginx for HTTP
@@ -199,10 +226,16 @@ var installCmd = &cobra.Command{
199
226
// Step 9: Download and install the relay binary
200
227
khatru29 .InstallRelayBinary ()
201
228
202
- // Step 10: Set up the relay service
203
- khatru29 .SetupRelayService (relayDomain , privKey , relayContact )
229
+ // Step 10: Set up the relay data directory
230
+ khatru29 .SetUpRelayDataDir ()
231
+
232
+ // Step 11: Configure the relay
233
+ khatru29 .ConfigureRelay (relayDomain , privKey , relayContact )
204
234
205
- // Step 11: Show success messages
235
+ // Step 12: Set up the relay service
236
+ khatru29 .SetUpRelayService ()
237
+
238
+ // Step 13: Show success messages
206
239
khatru29 .SuccessMessages (relayDomain , httpsEnabled )
207
240
} else if selectedRelayOption == strfry29 .RelayName {
208
241
// Step 6: Configure Nginx for HTTP
@@ -218,10 +251,16 @@ var installCmd = &cobra.Command{
218
251
// Step 9: Download and install the relay binary
219
252
strfry29 .InstallRelayBinary ()
220
253
221
- // Step 10: Set up the relay service
222
- strfry29 .SetupRelayService (relayDomain , pubKey , privKey , relayContact )
254
+ // Step 10: Set up the relay data directory
255
+ strfry29 .SetUpRelayDataDir ()
256
+
257
+ // Step 11: Configure the relay
258
+ strfry29 .ConfigureRelay (relayDomain , pubKey , privKey , relayContact )
259
+
260
+ // Step 12: Set up the relay service
261
+ strfry29 .SetUpRelayService ()
223
262
224
- // Step 11 : Show success messages
263
+ // Step 13 : Show success messages
225
264
strfry29 .SuccessMessages (relayDomain , httpsEnabled )
226
265
}
227
266
0 commit comments