-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (28 loc) · 788 Bytes
/
Makefile
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
33
34
35
36
37
PREFIX = /usr/local
NAGIOS_DIR = /etc/nagios
TARGET = beacon.sh
PROTOS = contact_protocols
BIN_DIR = $(PREFIX)/sbin
PROTO_DIR = $(NAGIOS_DIR)/$(PROTOS)
TEMPLATES = $(PROTOS)/*.rc
.PHONY: install $(TARGET) $(TEMPLATES)
install: $(TARGET)
update:
git pull
$(TARGET):
install -m 0755 $(TARGET) $(BIN_DIR)/
$(TEMPLATES): $(PROTO_DIR)
install -m 0644 $@ $(PROTO_DIR)/
$(PROTO_DIR):
install -d $(PROTO_DIR)
all::
@echo "try make install"
nagios-commands:
@echo "define command {"
@echo "\tcommand_name service-notify-by-beacon"
@echo "\tcommand_line /usr/local/sbin/beacon.sh --service &> /tmp/beacon.err"
@echo "}"
@echo "define command {"
@echo "\tcommand_name host-notify-by-beacon"
@echo "\tcommand_line /usr/local/sbin/beacon.sh --host &> /tmp/beacon.err"
@echo "}"