Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
James Coyle
cockroach-deploy
Commits
f4a00dd0
Commit
f4a00dd0
authored
Jun 05, 2018
by
James Coyle
Browse files
Added hosts switch based on /etc/cockroachdb/hosts file existing or not
parent
2ae032a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockroach.service
View file @
f4a00dd0
[Unit]
Description
=
Cockroach db
auto starter
Description
=
Cockroach db
[Install]
WantedBy
=
multi-user.target
[Service]
ExecStart
=
/usr/local/bin/cockroach start --certs-dir=/etc/cockroachdb/certs --store=/var/data/cockroachdb/ --port=26257 --http-port=7005 --logtostderr=ERROR
ExecStartPre
=
/bin/bash -c "[[ -f /etc/cockroachdb/hosts ]] && (/bin/systemctl set-environment JOIN_SWITCH="--join="$(cat /etc/cockroachdb/hosts))"
ExecStart
=
/usr/local/bin/cockroach start --certs-dir=/etc/cockroachdb/certs
\
--store=/var/data/cockroachdb/
\
--cache=.40
\
--max-sql-memory=.30
\
--external-io-dir=/tmp/cockroachdb/externalio
\
--temp-dir=/tmp/cockroachdb/tmp
\
--port=26257
\
--http-port=7005
\
--logtostderr=ERROR
\
--log-dir=/var/logs/cockroachdb
\
$JOIN_SWITCH
ExecStop=/usr/local/bin/cockroach quit --certs-dir=/etc/cockroachdb/certs
SyslogIdentifier=cockroachdb
Restart=always
RestartSec=10
StandardOutput=syslog
StandardError=syslog
LimitNOFILE=35000
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment