Skip to content

Commit

Permalink
Add a systemd exabgp instance service
Browse files Browse the repository at this point in the history
- Add systemd instance exabgp@
- Add the [email protected] in all the Redhat spec file

Note: Not able to add the [email protected] for debian distribution
Signed-off-by: Jeremy MAURO <[email protected]>
  • Loading branch information
Jeremy MAURO committed Oct 26, 2017
1 parent b367255 commit 3a320ba
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions etc/systemd/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Unit]
Description=ExaBGP for instance %i
Documentation=man:exabgp(1)
Documentation=man:exabgp.conf(5)
Documentation=https://github.com/Exa-Networks/exabgp/wiki
After=network.target
ConditionPathExists=/etc/exabgp/exabgp-%i.conf

[Service]
Environment=exabgp_daemon_daemonize=false
Environment=EXABGP_INSTANCE=exabgp-%i
ExecStart=/usr/sbin/exabgp /etc/exabgp/${EXABGP_INSTANCE}.conf
ExecReload=/bin/kill -USR1 $MAINPID

[Install]
WantedBy=multi-user.target
1 change: 1 addition & 0 deletions redhat/python-exabgp.spec
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ mv ${RPM_BUILD_ROOT}/usr/etc/exabgp ${RPM_BUILD_ROOT}/%{_sysconfdir}/

install -d %{buildroot}/%{_unitdir}
install etc/systemd/exabgp.service %{buildroot}/%{_unitdir}/
install etc/systemd/[email protected] %{buildroot}/%{_unitdir}/

install -d %{buildroot}/%{_mandir}/man1
install doc/man/exabgp.1 %{buildroot}/%{_mandir}/man1
Expand Down
1 change: 1 addition & 0 deletions redhat/python-exabgp.spec.git
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ mv ${RPM_BUILD_ROOT}/usr/share/exabgp/etc/* ${RPM_BUILD_ROOT}/%{_sysconfdir}/exa

install -d %{buildroot}/%{_unitdir}
install etc/systemd/exabgp.service %{buildroot}/%{_unitdir}/
install etc/systemd/[email protected] %{buildroot}/%{_unitdir}/

install -d %{buildroot}/%{_mandir}/man1
install doc/man/exabgp.1 %{buildroot}/%{_mandir}/man1
Expand Down

0 comments on commit 3a320ba

Please sign in to comment.