]>
Commit | Line | Data |
---|---|---|
b49c106e | 1 | [Unit] |
84ad1208 | 2 | Description=Open vSwitch Database Unit |
36af136b AC |
3 | After=syslog.target network-pre.target |
4 | Before=network.target network.service | |
a694ead1 | 5 | Wants=ovs-delete-transient-ports.service |
b49c106e | 6 | PartOf=openvswitch.service |
b49c106e FL |
7 | |
8 | [Service] | |
84ad1208 | 9 | Type=forking |
f385abde | 10 | PIDFile=/var/run/openvswitch/ovsdb-server.pid |
c19bf36d | 11 | Restart=on-failure |
92d53574 | 12 | EnvironmentFile=/etc/openvswitch/default.conf |
b49c106e | 13 | EnvironmentFile=-/etc/sysconfig/openvswitch |
7a65e5a9 | 14 | ExecStartPre=-/usr/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch |
94e1e8be JCR |
15 | ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch.useropts; /usr/bin/echo "OVS_USER_ID=${OVS_USER_ID}" > /run/openvswitch.useropts' |
16 | ExecStartPre=/bin/sh -c 'if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /usr/bin/echo "OVS_USER_OPT=--ovs-user=${OVS_USER_ID}" >> /run/openvswitch.useropts; fi' | |
0186c380 | 17 | EnvironmentFile=-/run/openvswitch.useropts |
84ad1208 AC |
18 | ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \ |
19 | --no-ovs-vswitchd --no-monitor --system-id=random \ | |
94e1e8be | 20 | ${OVS_USER_OPT} \ |
84ad1208 AC |
21 | start $OPTIONS |
22 | ExecStop=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd stop | |
23 | ExecReload=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd \ | |
94e1e8be | 24 | ${OVS_USER_OPT} \ |
84ad1208 | 25 | --no-monitor restart $OPTIONS |