]> git.proxmox.com Git - mirror_ovs.git/blame - rhel/usr_lib_systemd_system_ovsdb-server.service
rhel: Revert RHEL 7.4 comp_ver change
[mirror_ovs.git] / rhel / usr_lib_systemd_system_ovsdb-server.service
CommitLineData
b49c106e 1[Unit]
84ad1208 2Description=Open vSwitch Database Unit
36af136b
AC
3After=syslog.target network-pre.target
4Before=network.target network.service
a694ead1 5Wants=ovs-delete-transient-ports.service
b49c106e 6PartOf=openvswitch.service
b49c106e
FL
7
8[Service]
84ad1208 9Type=forking
f385abde 10PIDFile=/var/run/openvswitch/ovsdb-server.pid
c19bf36d 11Restart=on-failure
92d53574 12EnvironmentFile=/etc/openvswitch/default.conf
b49c106e 13EnvironmentFile=-/etc/sysconfig/openvswitch
7a65e5a9 14ExecStartPre=-/usr/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch
94e1e8be
JCR
15ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch.useropts; /usr/bin/echo "OVS_USER_ID=${OVS_USER_ID}" > /run/openvswitch.useropts'
16ExecStartPre=/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 17EnvironmentFile=-/run/openvswitch.useropts
84ad1208
AC
18ExecStart=/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
22ExecStop=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd stop
23ExecReload=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd \
94e1e8be 24 ${OVS_USER_OPT} \
84ad1208 25 --no-monitor restart $OPTIONS