File tree 1 file changed +14
-3
lines changed 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -109,8 +109,10 @@ brews:
109
109
repository :
110
110
owner : claceio
111
111
name : homebrew-clace
112
+ dependencies :
113
+ - name : " mkcert"
112
114
service : |
113
- run [ opt_bin/"clace" ]
115
+ run [ opt_bin/"clace", "server", "start" ]
114
116
keep_alive true
115
117
working_dir HOMEBREW_PREFIX
116
118
log_path var/"log/clace.log"
@@ -120,6 +122,15 @@ brews:
120
122
bin.install "clace"
121
123
post_install : |-
122
124
unless File.exist?("#{etc}/clace.toml")
123
- stderr = Utils.popen_read("#{opt_bin}/clace password 1>#{etc}/clace.toml 2>&1")
124
- puts stderr
125
+ pid = spawn("#{opt_bin}/clace password", out: "#{etc}/clace.toml")
126
+ puts "********** Initializing \"admin\" user **********"
127
+ Process.wait(pid)
128
+ puts "***********************************************"
129
+
130
+ mkcert_path = `which mkcert`.chomp
131
+ unless mkcert_path.empty?
132
+ system("mkdir -p #{HOMEBREW_PREFIX}/var/clace/config/certificates")
133
+ system("#{mkcert_path} -cert-file #{HOMEBREW_PREFIX}/var/clace/config/certificates/default.crt -key-file #{HOMEBREW_PREFIX}/var/clace/config/certificates/default.key localhost 127.0.0.1 \"*.localhost\"")
134
+ puts "Created localhost TLS certificates"
135
+ end
125
136
end
You can’t perform that action at this time.
0 commit comments