Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
caddy
Commits
73273c5b
Commit
73273c5b
authored
Aug 26, 2018
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure assets path exists before writing UUID file
parent
93c52563
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
caddy/caddymain/run.go
caddy/caddymain/run.go
+6
-1
No files found.
caddy/caddymain/run.go
View file @
73273c5b
...
@@ -355,7 +355,12 @@ func initTelemetry() error {
...
@@ -355,7 +355,12 @@ func initTelemetry() error {
newUUID
:=
func
()
uuid
.
UUID
{
newUUID
:=
func
()
uuid
.
UUID
{
id
:=
uuid
.
New
()
id
:=
uuid
.
New
()
err
:=
ioutil
.
WriteFile
(
uuidFilename
,
[]
byte
(
id
.
String
()),
0600
)
// human-readable as a string
err
:=
os
.
MkdirAll
(
caddy
.
AssetsPath
(),
0700
)
if
err
!=
nil
{
log
.
Printf
(
"[ERROR] Persisting instance UUID: %v"
,
err
)
return
id
}
err
=
ioutil
.
WriteFile
(
uuidFilename
,
[]
byte
(
id
.
String
()),
0600
)
// human-readable as a string
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Printf
(
"[ERROR] Persisting instance UUID: %v"
,
err
)
log
.
Printf
(
"[ERROR] Persisting instance UUID: %v"
,
err
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment