-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
73 lines (60 loc) · 1.85 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
CONFIG=Makefile.config
include $(CONFIG)
default: build
build:
for file in \
60_bloonix_check_linux_updates \
60_bloonix_check_lsi_raid \
60_bloonix_check_mdadm \
60_bloonix_check_service \
60_bloonix_check_smart_health \
; do \
cp sudoers/$$file.in sudoers/$$file; \
sed -i "s!@@PREFIX@@!$(PREFIX)!g" sudoers/$$file; \
done;
install:
if test ! -e "$(PREFIX)/lib/bloonix/plugins" ; then \
mkdir -p $(PREFIX)/lib/bloonix/plugins; \
chmod 755 $(PREFIX)/lib/bloonix/plugins; \
fi;
cd plugins; for file in check-* ; do \
cp $$file $(PREFIX)/lib/bloonix/plugins/; \
chmod 755 $(PREFIX)/lib/bloonix/plugins/$$file; \
done;
if test ! -e "$(PREFIX)/lib/bloonix/etc/plugins" ; then \
mkdir -p $(PREFIX)/lib/bloonix/etc/plugins; \
chmod 755 $(PREFIX)/lib/bloonix/etc/plugins; \
fi;
cd plugins; for file in plugin-* ; do \
cp $$file $(PREFIX)/lib/bloonix/etc/plugins/; \
chmod 644 $(PREFIX)/lib/bloonix/etc/plugins/$$file; \
done;
if test ! -e "$(PREFIX)/lib/bloonix/etc/sudoers.d" ; then \
mkdir -p $(PREFIX)/lib/bloonix/etc/sudoers.d; \
chmod 755 $(PREFIX)/lib/bloonix/etc/sudoers.d; \
fi;
if test ! -e "$(PREFIX)/lib/bloonix/etc/conf.d" ; then \
mkdir -p $(PREFIX)/lib/bloonix/etc/conf.d; \
chmod 755 $(PREFIX)/lib/bloonix/etc/conf.d; \
fi;
for file in \
check-linux-updates.conf \
check-lsi-raid.conf \
check-mdadm.conf \
check-service.conf \
check-smart-health.conf \
; do \
cp -a sudoers/$$file $(PREFIX)/lib/bloonix/etc/conf.d/$$file; \
chmod 644 $(PREFIX)/lib/bloonix/etc/conf.d/$$file; \
done;
for file in \
60_bloonix_check_linux_updates \
60_bloonix_check_lsi_raid \
60_bloonix_check_mdadm \
60_bloonix_check_service \
60_bloonix_check_smart_health \
; do \
cp -a sudoers/$$file $(PREFIX)/lib/bloonix/etc/sudoers.d/$$file; \
chmod 644 $(PREFIX)/lib/bloonix/etc/sudoers.d/$$file; \
done;
clean: