
Partially Implements: Blueprint standard-start Co-Authored-By: Swapnil Kulkarni <me@coolsvap.net> Change-Id: I52ed4b56efe3fc4ebbc108b2fe7e9d69eb0f0928
17 lines
406 B
Bash
17 lines
406 B
Bash
#!/bin/bash
|
|
|
|
set -o errexit
|
|
|
|
LOG_FILE="/var/log/openvswitch/ovsdb-server.log"
|
|
DB_FILE="/etc/openvswitch/conf.db"
|
|
UNIXSOCK_DIR="/var/run/openvswitch"
|
|
UNIXSOCK="${UNIXSOCK_DIR}/db.sock"
|
|
|
|
mkdir -p "${UNIXSOCK_DIR}"
|
|
|
|
if [[ ! -e "${DB_FILE}" ]]; then
|
|
ovsdb-tool create "${DB_FILE}"
|
|
fi
|
|
|
|
exec ovsdb-server $DB_FILE -vconsole:emer -vsyslog:err -vfile:info --remote=punix:"${UNIXSOCK}" --log-file="${LOG_FILE}"
|