mirror of
https://github.com/alice-lg/birdwatcher.git
synced 2025-03-30 00:00:17 +01:00
added rpm build option for upstart and systemd
This commit is contained in:
parent
53ff3aa013
commit
340b13ab6e
7 changed files with 18 additions and 14 deletions
14
Makefile
14
Makefile
|
@ -11,6 +11,8 @@ VERSION=$(APP_VERSION)_$(shell git rev-parse --short HEAD)
|
|||
|
||||
BUILD_SERVER=''
|
||||
|
||||
SYSTEM_INIT=systemd
|
||||
|
||||
DIST=DIST/
|
||||
REMOTE_DIST=$(PROG)-$(DIST)
|
||||
|
||||
|
@ -44,12 +46,20 @@ endif
|
|||
dist: clean linux
|
||||
|
||||
mkdir -p $(DIST)opt/ecix/birdwatcher/bin
|
||||
mkdir -p $(DIST)etc/systemd
|
||||
mkdir -p $(DIST)etc/ecix
|
||||
|
||||
ifeq ($(SYSTEM_INIT), systemd)
|
||||
# Installing systemd services
|
||||
mkdir -p $(DIST)usr/lib/systemd/system/
|
||||
cp install/systemd/* $(DIST)usr/lib/systemd/system/.
|
||||
else
|
||||
# Installing upstart configuration
|
||||
mkdir -p $(DIST)/etc/init/
|
||||
cp install/upstart/init/* $(DIST)etc/init/.
|
||||
endif
|
||||
|
||||
|
||||
# Copy config and startup script
|
||||
cp etc/systemd/* DIST/etc/systemd/.
|
||||
cp etc/ecix/* DIST/etc/ecix/.
|
||||
rm -f DIST/etc/ecix/*.local.*
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[Unit]
|
||||
Wants=birdwatcher4.service birdwatcher6.service
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
|
||||
[Unit]
|
||||
Description=Birdwatcher (IPv4)
|
||||
Description=BIRDwatcher IPv4
|
||||
Wants=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/opt/ecix/birdwatcher/bin/birdwatcher-linux-amd64
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
|
||||
[Unit]
|
||||
Description=Birdwatcher (IPv6)
|
||||
Description=BIRDwatcher IPv6
|
||||
Wants=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/opt/ecix/birdwatcher/bin/birdwatcher-linux-amd64 -6
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
Loading…
Add table
Reference in a new issue