Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1005)

Delta Between Two Patch Sets: upstart/upstart.go

Issue 8551048: environs/cloudinit: increase fd limit for mongodb (Closed)
Left Patch Set: Created 10 years, 11 months ago
Right Patch Set: environs/cloudinit: increase fd limit for mongodb Created 10 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « environs/cloudinit/cloudinit_test.go ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 package upstart 1 package upstart
2 2
3 import ( 3 import (
4 "bytes" 4 "bytes"
5 "errors" 5 "errors"
6 "fmt" 6 "fmt"
7 "io/ioutil" 7 "io/ioutil"
8 "os" 8 "os"
9 "os/exec" 9 "os/exec"
10 "path" 10 "path"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // (as used by upstart); this may become an issue in the future. 89 // (as used by upstart); this may become an issue in the future.
90 var confT = template.Must(template.New("").Parse(` 90 var confT = template.Must(template.New("").Parse(`
91 description "{{.Desc}}" 91 description "{{.Desc}}"
92 author "Juju Team <juju@lists.ubuntu.com>" 92 author "Juju Team <juju@lists.ubuntu.com>"
93 start on runlevel [2345] 93 start on runlevel [2345]
94 stop on runlevel [!2345] 94 stop on runlevel [!2345]
95 respawn 95 respawn
96 normal exit 0 96 normal exit 0
97 {{range $k, $v := .Env}}env {{$k}}={{$v|printf "%q"}} 97 {{range $k, $v := .Env}}env {{$k}}={{$v|printf "%q"}}
98 {{end}} 98 {{end}}
99 {{range $k, $v := .Limit}}limit {{$k}} {{$v|printf "%s"}} 99 {{range $k, $v := .Limit}}limit {{$k}} {{$v}}
100 {{end}} 100 {{end}}
101 exec {{.Cmd}}{{if .Out}} >> {{.Out}} 2>&1{{end}} 101 exec {{.Cmd}}{{if .Out}} >> {{.Out}} 2>&1{{end}}
102 `[1:])) 102 `[1:]))
103 103
104 // Conf is responsible for defining and installing upstart services. Its fields 104 // Conf is responsible for defining and installing upstart services. Its fields
105 // represent elements of an upstart service configuration file. 105 // represent elements of an upstart service configuration file.
106 type Conf struct { 106 type Conf struct {
107 Service 107 Service
108 // Desc is the upstart service's description. 108 // Desc is the upstart service's description.
109 Desc string 109 Desc string
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 func (c *Conf) InstallCommands() ([]string, error) { 169 func (c *Conf) InstallCommands() ([]string, error) {
170 conf, err := c.render() 170 conf, err := c.render()
171 if err != nil { 171 if err != nil {
172 return nil, err 172 return nil, err
173 } 173 }
174 return []string{ 174 return []string{
175 fmt.Sprintf("cat >> %s << 'EOF'\n%sEOF\n", c.confPath(), conf), 175 fmt.Sprintf("cat >> %s << 'EOF'\n%sEOF\n", c.confPath(), conf),
176 "start " + c.Name, 176 "start " + c.Name,
177 }, nil 177 }, nil
178 } 178 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b