Detach the command to open the url so the http server can start
This commit is contained in:
parent
81f4ab46c7
commit
dd6ec82cba
@ -203,7 +203,7 @@ func (p ProviderConfig) Authenticate(t *OAuth2Token) error {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Filter the commands, and replace "{}" with our callback url
|
// Filter the commands, and replace "{}" with our callback url
|
||||||
c := p.AgentCommand[:0]
|
c := make([]string, 0, len(p.AgentCommand))
|
||||||
replacedURL := false
|
replacedURL := false
|
||||||
for _, arg := range p.AgentCommand {
|
for _, arg := range p.AgentCommand {
|
||||||
if arg == "{}" {
|
if arg == "{}" {
|
||||||
@ -219,7 +219,8 @@ func (p ProviderConfig) Authenticate(t *OAuth2Token) error {
|
|||||||
|
|
||||||
//TODO Drop privileges
|
//TODO Drop privileges
|
||||||
cmd := exec.Command(c[0], c[1:]...)
|
cmd := exec.Command(c[0], c[1:]...)
|
||||||
cmd.Run()
|
cmd.Start()
|
||||||
|
cmd.Process.Release()
|
||||||
|
|
||||||
server := &http.Server{}
|
server := &http.Server{}
|
||||||
go func() {
|
go func() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user