~juju-qa/juju-core/1.16-packaging

« back to all changes in this revision

Viewing changes to src/launchpad.net/juju-core/upstart/service.go

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-09-20 22:06:08 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20130920220608-298qxyybgb0n9c47
Tags: 1.14.1-0ubuntu1
New upstream point release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
import (
7
7
        "fmt"
8
 
        "path/filepath"
 
8
        "path"
9
9
 
10
10
        "launchpad.net/juju-core/utils"
11
11
)
17
17
 
18
18
// MongoUpstartService returns the upstart config for the mongo state service.
19
19
func MongoUpstartService(name, dataDir, dbDir string, port int) *Conf {
20
 
        keyFile := filepath.Join(dataDir, "server.pem")
 
20
        keyFile := path.Join(dataDir, "server.pem")
21
21
        svc := NewService(name)
22
22
        return &Conf{
23
23
                Service: *svc,
44
44
// based on the tag and machineId passed in.
45
45
func MachineAgentUpstartService(name, toolsDir, dataDir, logDir, tag, machineId, logConfig string, env map[string]string) *Conf {
46
46
        svc := NewService(name)
47
 
        logFile := filepath.Join(logDir, tag+".log")
 
47
        logFile := path.Join(logDir, tag+".log")
48
48
        return &Conf{
49
49
                Service: *svc,
50
50
                Desc:    fmt.Sprintf("juju %s agent", tag),
51
51
                Limit: map[string]string{
52
52
                        "nofile": fmt.Sprintf("%d %d", maxAgentFiles, maxAgentFiles),
53
53
                },
54
 
                Cmd: filepath.Join(toolsDir, "jujud") +
 
54
                Cmd: path.Join(toolsDir, "jujud") +
55
55
                        " machine" +
56
56
                        " --log-file " + utils.ShQuote(logFile) +
57
57
                        " --data-dir " + utils.ShQuote(dataDir) +