jpackage stuff
This commit is contained in:
74
main.go
74
main.go
@ -140,49 +140,47 @@ func main() {
|
||||
}
|
||||
log.Println("Using auto-detected language", *lang)
|
||||
}
|
||||
if tbget.TestHTTPDefaultProxy() {
|
||||
log.Println("I2P HTTP proxy OK")
|
||||
} else {
|
||||
log.Println("I2P HTTP proxy not OK")
|
||||
run, err := i2cpcheck.ConditionallyLaunchI2P()
|
||||
if err != nil {
|
||||
log.Println("Couldn't launch I2P", err)
|
||||
}
|
||||
if run {
|
||||
if tbget.TestHTTPDefaultProxy() {
|
||||
log.Println("I2P HTTP proxy OK after launching I2P")
|
||||
} else {
|
||||
go proxy()
|
||||
if !tbget.TestHTTPBackupProxy() {
|
||||
log.Fatal("Please set the I2P HTTP proxy on localhost:4444", err)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
I2Pdaemon, err := I2P.NewDaemon(*directory, false)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return
|
||||
}
|
||||
if err = I2Pdaemon.Start(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
shutdown = true
|
||||
defer I2Pdaemon.Stop()
|
||||
go runSysTray(true)
|
||||
if tbget.TestHTTPDefaultProxy() {
|
||||
log.Println("I2P HTTP proxy OK")
|
||||
} else {
|
||||
log.Fatal("Embedded i2pd unable to start")
|
||||
}
|
||||
}
|
||||
}
|
||||
var err error
|
||||
client, err = tbserve.NewClient(*verbose, *lang, *system, *arch, *mirror, &content)
|
||||
if err != nil {
|
||||
log.Fatal("Couldn't create client", err)
|
||||
}
|
||||
if *i2pbrowser || *i2pconfig {
|
||||
if tbget.TestHTTPDefaultProxy() {
|
||||
log.Println("I2P HTTP proxy OK")
|
||||
} else {
|
||||
log.Println("I2P HTTP proxy not OK")
|
||||
run, err := i2cpcheck.ConditionallyLaunchI2P()
|
||||
if err != nil {
|
||||
log.Println("Couldn't launch I2P", err)
|
||||
}
|
||||
if run {
|
||||
if tbget.TestHTTPDefaultProxy() {
|
||||
log.Println("I2P HTTP proxy OK after launching I2P")
|
||||
} else {
|
||||
go proxy()
|
||||
if !tbget.TestHTTPBackupProxy() {
|
||||
log.Fatal("Please set the I2P HTTP proxy on localhost:4444", err)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
I2Pdaemon, err := I2P.NewDaemon(*directory, false)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return
|
||||
}
|
||||
if err = I2Pdaemon.Start(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
shutdown = true
|
||||
defer I2Pdaemon.Stop()
|
||||
go runSysTray(true)
|
||||
if tbget.TestHTTPDefaultProxy() {
|
||||
log.Println("I2P HTTP proxy OK")
|
||||
} else {
|
||||
log.Fatal("Embedded i2pd unable to start")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if *apparmor {
|
||||
err := GenerateAppArmor()
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user