|
@@ -5,12 +5,9 @@
|
|
package server
|
|
package server
|
|
|
|
|
|
import (
|
|
import (
|
|
- "fmt"
|
|
|
|
-
|
|
|
|
"github.com/docker/docker/daemon"
|
|
"github.com/docker/docker/daemon"
|
|
"github.com/docker/docker/daemonconfig"
|
|
"github.com/docker/docker/daemonconfig"
|
|
"github.com/docker/docker/engine"
|
|
"github.com/docker/docker/engine"
|
|
- "github.com/docker/docker/utils"
|
|
|
|
)
|
|
)
|
|
|
|
|
|
func (srv *Server) handlerWrap(h engine.Handler) engine.Handler {
|
|
func (srv *Server) handlerWrap(h engine.Handler) engine.Handler {
|
|
@@ -24,17 +21,6 @@ func (srv *Server) handlerWrap(h engine.Handler) engine.Handler {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-func InitPidfile(job *engine.Job) engine.Status {
|
|
|
|
- if len(job.Args) == 0 {
|
|
|
|
- return job.Error(fmt.Errorf("no pidfile provided to initialize"))
|
|
|
|
- }
|
|
|
|
- job.Logf("Creating pidfile")
|
|
|
|
- if err := utils.CreatePidFile(job.Args[0]); err != nil {
|
|
|
|
- return job.Error(err)
|
|
|
|
- }
|
|
|
|
- return engine.StatusOK
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
// jobInitApi runs the remote api server `srv` as a daemon,
|
|
// jobInitApi runs the remote api server `srv` as a daemon,
|
|
// Only one api server can run at the same time - this is enforced by a pidfile.
|
|
// Only one api server can run at the same time - this is enforced by a pidfile.
|
|
// The signals SIGINT, SIGQUIT and SIGTERM are intercepted for cleanup.
|
|
// The signals SIGINT, SIGQUIT and SIGTERM are intercepted for cleanup.
|