Commit 1f978566 authored by James Coyle's avatar James Coyle

Added host switch

parent 1ef13107
...@@ -6,6 +6,8 @@ WantedBy=multi-user.target ...@@ -6,6 +6,8 @@ WantedBy=multi-user.target
[Service] [Service]
ExecStartPre=/bin/bash -c "test -f /etc/cockroachdb/hosts && (/bin/systemctl set-environment JOIN_SWITCH=--join=$(test -f /etc/cockroachdb/hosts && cat /dev/null /etc/cockroachdb/hosts)) || exit 0" ExecStartPre=/bin/bash -c "test -f /etc/cockroachdb/hosts && (/bin/systemctl set-environment JOIN_SWITCH=--join=$(test -f /etc/cockroachdb/hosts && cat /dev/null /etc/cockroachdb/hosts)) || exit 0"
ExecStartPre=/bin/bash -c "test -f /etc/cockroachdb/host && (/bin/systemctl set-environment HOST_SWITCH=--host=$(test -f /etc/cockroachdb/host && cat /dev/null /etc/cockroachdb/host)) || exit 0"
ExecStart=/usr/local/bin/cockroach start --certs-dir=/etc/cockroachdb/certs \ ExecStart=/usr/local/bin/cockroach start --certs-dir=/etc/cockroachdb/certs \
--store=/var/data/cockroachdb/ \ --store=/var/data/cockroachdb/ \
--cache=.40 \ --cache=.40 \
...@@ -16,7 +18,7 @@ ExecStart=/usr/local/bin/cockroach start --certs-dir=/etc/cockroachdb/certs \ ...@@ -16,7 +18,7 @@ ExecStart=/usr/local/bin/cockroach start --certs-dir=/etc/cockroachdb/certs \
--http-port=7005 \ --http-port=7005 \
--logtostderr=ERROR \ --logtostderr=ERROR \
--log-dir=/var/logs/cockroachdb \ --log-dir=/var/logs/cockroachdb \
$JOIN_SWITCH $JOIN_SWITCH $HOST_SWITCH
ExecStop=/usr/local/bin/cockroach quit --certs-dir=/etc/cockroachdb/certs ExecStop=/usr/local/bin/cockroach quit --certs-dir=/etc/cockroachdb/certs
SyslogIdentifier=cockroachdb SyslogIdentifier=cockroachdb
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment