aboutsummaryrefslogtreecommitdiff
path: root/docker/openvswitch/openvswitch-db-server/extend_start.sh
blob: d25038bddcb0072b8d59b9d65f89be862c63096e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

mkdir -p "/run/openvswitch"
if [[ ! -e "/var/lib/openvswitch/conf.db" ]]; then
    ovsdb-tool create "/var/lib/openvswitch/conf.db"
fi

if [[ $(ovsdb-tool needs-conversion /var/lib/openvswitch/conf.db) == yes ]]; then
    ovsdb-tool convert "/var/lib/openvswitch/conf.db"
fi

if [[ ! -r "/var/log/kolla/openvswitch/ovsdb-server.log" ]]; then
    touch /var/log/kolla/openvswitch/ovsdb-server.log
    chown openvswitch:openvswitch /var/log/kolla/openvswitch/ovsdb-server.log
fi