2 // Armadillo File Manager
3 // Copyright (c) 2010, Robert Sesek <http://www.bluestatic.org>
5 // This program is free software: you can redistribute it and/or modify it under
6 // the terms of the GNU General Public License as published by the Free Software
7 // Foundation, either version 3 of the License, or any later version.
21 var configPath *string = flag.String("config", "~/.armadillo", "Path to the configuration file")
22 flag.StringVar(&paths.JailRoot, "jail", "/", "Restrict file operations to this directory root")
23 var port *int = flag.Int("port", 8080, "Port to run the server on")
26 var configuration = new(config.Configuration)
27 fmt.Printf("Reading configuration from %v\n", *configPath)
28 if len(*configPath) > 0 {
29 error := config.ReadFromFile(*configPath, configuration)
31 fmt.Printf("Error while reading configuration: %v\n", error)
35 configuration.JailRoot = paths.JailRoot
36 configuration.Port = *port
38 fmt.Printf("Starting Armadillo on port %d with root:\n %v\n", *port, paths.JailRoot)
39 server.RunFrontEnd(configuration)