mirror of
https://github.com/FlipsideCrypto/dcrd.git
synced 2026-02-06 10:56:47 +00:00
config: export sampleconfig for use by dcrinstall
This commit is contained in:
parent
aa2b50714e
commit
d18bca456e
@ -27,6 +27,7 @@ import (
|
||||
"github.com/decred/dcrd/database"
|
||||
_ "github.com/decred/dcrd/database/ffldb"
|
||||
"github.com/decred/dcrd/mempool"
|
||||
"github.com/decred/dcrd/sampleconfig"
|
||||
"github.com/decred/dcrutil"
|
||||
)
|
||||
|
||||
@ -353,7 +354,7 @@ func createDefaultConfigFile(destPath string) error {
|
||||
// file contents with their generated values.
|
||||
rpcUserRE := regexp.MustCompile(`(?m)^;\s*rpcuser=[^\s]*$`)
|
||||
rpcPassRE := regexp.MustCompile(`(?m)^;\s*rpcpass=[^\s]*$`)
|
||||
s := rpcUserRE.ReplaceAllString(sampleConfigFileContents, rpcUserLine)
|
||||
s := rpcUserRE.ReplaceAllString(sampleconfig.FileContents, rpcUserLine)
|
||||
s = rpcPassRE.ReplaceAllString(s, rpcPassLine)
|
||||
|
||||
// Create config file at the provided path.
|
||||
|
||||
@ -2,9 +2,10 @@
|
||||
// Use of this source code is governed by an ISC
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package main
|
||||
package sampleconfig
|
||||
|
||||
var sampleConfigFileContents = `[Application Options]
|
||||
// FileContents is a string containing the commented example config for dcrd.
|
||||
var FileContents = `[Application Options]
|
||||
|
||||
; ------------------------------------------------------------------------------
|
||||
; Data settings
|
||||
Loading…
Reference in New Issue
Block a user