forked from EdgeCloudX/ovn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathusr_lib_systemd_system_ovn-northd.service
32 lines (29 loc) · 1.21 KB
/
usr_lib_systemd_system_ovn-northd.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# See ovn-northd(8) for details about ovn-northd.
#
# To customize the ovn-northd service, you may create a configuration file
# in the /etc/systemd/system/ovn-northd.d/ directory. For example, to specify
# additional options to be passed to the "ovn-ctl start_northd" command, you
# could place the following contents in
# /etc/systemd/system/ovn-northd.d/local.conf:
#
# [System]
# Environment="OVN_NORTHD_OPTS=--db-nb-sock=/usr/local/var/run/ovn/ovnnb_db.sock --db-sb-sock=/usr/local/var/run/ovn/ovnsb_db.sock"
#
# Alternatively, you may specify environment variables in the file /etc/sysconfig/ovn-northd:
#
# OVN_NORTHD_OPTS="--db-nb-sock=/usr/local/var/run/ovn/ovnnb_db.sock --db-sb-sock=/usr/local/var/run/ovn/ovnsb_db.sock"
[Unit]
Description=OVN northd management daemon
After=syslog.target
[Service]
Type=oneshot
RemainAfterExit=yes
Environment=OVN_RUNDIR=%t/ovn OVN_DBDIR=/var/lib/ovn
EnvironmentFile=-/etc/sysconfig/ovn
EnvironmentFile=-/etc/sysconfig/ovn-northd
ExecStartPre=-/usr/bin/chown -R ${OVN_USER_ID} ${OVN_DBDIR}
ExecStart=/usr/share/ovn/scripts/ovn-ctl \
--ovn-user=${OVN_USER_ID} start_northd $OVN_NORTHD_OPTS
ExecStop=/usr/share/ovn/scripts/ovn-ctl stop_northd
[Install]
WantedBy=multi-user.target