Browse Source

change -exportTofuBundle to -exportServerBundle

servers
Dan Ballard 1 month ago
parent
commit
44da3fd95f
  1. 2
      README.md
  2. 6
      app/main.go
  3. 2
      docker/Dockerfile

2
README.md

@ -8,7 +8,7 @@
The app takes the following arguments
- -debug: enabled debug logging
- -exportTofuBundle: Export the tofubundle to a file called tofubundle
- -exportServerBundle: Export the server bundle to a file called serverbundle
The app takes the following environment variables

6
app/main.go

@ -19,7 +19,7 @@ import (
func main() {
flagDebug := flag.Bool("debug", false, "Enable debug logging")
flagExportTofu := flag.Bool("exportTofuBundle", false, "Export the tofubundle to a file called tofubundle")
flagExportServer := flag.Bool("exportServerBundle", false, "Export the server bundle to a file called serverbundle")
flag.Parse()
log.AddEverythingFromPattern("server/app/main")
@ -85,9 +85,9 @@ func main() {
log.Infof("Server bundle (import into client to use server): %s\n", log.Magenta(server.ServerBundle()))
if *flagExportTofu {
if *flagExportServer {
// Todo: change all to server export
ioutil.WriteFile(path.Join(serverConfig.ConfigDir, "tofubundle"), []byte(server.TofuBundle()), 0600)
ioutil.WriteFile(path.Join(serverConfig.ConfigDir, "serverbundle"), []byte(server.TofuBundle()), 0600)
}
// Graceful Shutdown

2
docker/Dockerfile

@ -64,5 +64,5 @@ COPY ./docker/docker-entrypoint /usr/local/bin/
VOLUME /etc/tor /var/lib/tor /var/lib/cwtch
ENTRYPOINT ["docker-entrypoint"]
CMD ["/usr/local/bin/cwtch","--exportTofuBundle"]
CMD ["/usr/local/bin/cwtch","--exportServerBundle"]
Loading…
Cancel
Save