Commit c8721df8 authored by tomogoma's avatar tomogoma

Update commands to match latest release

parent c4c573e5
......@@ -5,7 +5,7 @@ Description=Cockroach db auto starter
WantedBy=multi-user.target
[Service]
ExecStart=/usr/local/bin/cockroach start --ca-cert=/etc/cockroachdb/certs/ca.cert --cert=/etc/cockroachdb/certs/node.cert --key=/etc/cockroachdb/certs/node.key --store=/var/data/cockroachdb/ --port=26257 --http-port=7005 --logtostderr=true --cache=0.35GB --max-sql-memory=0.35GB
ExecStop=/usr/local/bin/cockroach quit --ca-cert=/etc/cockroachdb/certs/ca.cert --cert=/etc/cockroachdb/certs/root.cert --key=/etc/cockroachdb/certs/root.key
ExecStart=/usr/local/bin/cockroach start --certs-dir=/etc/cockroachdb/certs --store=/var/data/cockroachdb/ --port=26257 --http-host=localhost --http-port=7005 --logtostderr=true
ExecStop=/usr/local/bin/cockroach quit --certs-dir=/etc/cockroachdb/certs
SyslogIdentifier=cockroachdb
Restart=always
......@@ -5,6 +5,7 @@ SYSTEMD_DIR="/etc/systemd/system"
DATA_DIR="/var/data/cockroachdb"
ETC="/etc/cockroachdb"
CERT_DIR="$ETC/certs"
CERT_PRIVATE_DIR="$CERT_DIR/private"
function usage {
printf "Cockroachdb Installer\nUsage: $1 /path/to/cockroachdb.tgz [user]\n"
......@@ -27,10 +28,10 @@ function setInstallDirs {
function installCerts {
mkdir -p "$CERT_DIR" || exit 1
pushd "$CERT_DIR" || exit 1
"$APP_DIR/cockroach" cert create-ca --ca-cert=ca.cert --ca-key=ca.key || exit 1
"$APP_DIR/cockroach" cert create-node localhost $(hostname) --ca-cert=ca.cert --ca-key=ca.key --cert=node.cert --key=node.key || exit 1
"$APP_DIR/cockroach" cert create-client root --ca-cert=ca.cert --ca-key=ca.key --cert=root.cert --key=root.key || exit 1
mkdir -p "$CERT_PRIVATE_DIR" || exit 1
"$APP_DIR/cockroach" cert create-ca --certs-dir="$CERT_DIR" --ca-key="$CERT_PRIVATE_DIR/ca.key" || exit 1
"$APP_DIR/cockroach" cert create-client root --certs-dir="$CERT_DIR" --ca-key="$CERT_PRIVATE_DIR/ca.key" || exit 1
"$APP_DIR/cockroach" cert create-node localhost $(hostname) --certs-dir="$CERT_DIR" --ca-key="$CERT_PRIVATE_DIR/ca.key" || exit 1
popd
}
......
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