change -exportTofuBundle to -exportServerBundle

This commit is contained in:
Dan Ballard 2021-10-29 16:06:18 -07:00
parent 206b5782ae
commit 44da3fd95f
3 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@
The app takes the following arguments The app takes the following arguments
- -debug: enabled debug logging - -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 The app takes the following environment variables

View File

@ -19,7 +19,7 @@ import (
func main() { func main() {
flagDebug := flag.Bool("debug", false, "Enable debug logging") 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() flag.Parse()
log.AddEverythingFromPattern("server/app/main") 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())) 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 // 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 // Graceful Shutdown

View File

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