10 # The list of files to install.
12 FILES = acct_users attrs attrs.access_reject attrs.accounting_response \
13 attrs.pre-proxy clients.conf dictionary eap.conf templates.conf \
14 experimental.conf hints huntgroups ldap.attrmap otp.conf \
15 policy.txt preproxy_users proxy.conf radiusd.conf \
16 snmp.conf sql.conf sqlippool.conf users policy.conf
19 # This target is here for local debugging
22 @if [ ! -d sites-enabled ]; then \
23 mkdir sites-enabled; \
25 @if [ ! -f sites-enabled/default ]; then \
26 cd sites-enabled && ln -s ../sites-available/default; \
28 @if [ ! -f sites-enabled/inner-tunnel ]; then \
29 cd sites-enabled && ln -s ../sites-available/inner-tunnel; \
33 $(INSTALL) -d -m 750 $(R)$(raddbdir)
34 $(INSTALL) -d -m 750 $(R)$(raddbdir)/sites-available
35 $(INSTALL) -d -m 750 $(R)$(raddbdir)/sites-enabled
36 $(INSTALL) -d -m 750 $(R)$(raddbdir)/modules
37 @echo "Creating/updating files in $(R)$(raddbdir)"; \
38 for i in $(FILES) `find sites-available/ modules/ -type f -print | sed 's/.*CVS.*//;s/.*~//;s/.*#.*//' `; do \
39 [ ! -f $(R)$(raddbdir)/$$i ] && $(INSTALL) -m 640 $$i $(R)$(raddbdir)/$$i; \
40 if [ "`find $$i -newer $(R)$(raddbdir)/$$i`" ]; then \
41 echo "** $(R)$(raddbdir)/$$i"; \
47 echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
48 echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
50 echo "** The sample configuration files in `pwd`";\
51 echo "** are newer than those in $(R)$(raddbdir)";\
53 echo "** Please investigate and manually copy (if appropriate) the files listed above.";\
55 echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
56 echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
58 chmod 640 $(R)$(raddbdir)/clients.conf
59 if [ ! -d $(R)$(raddbdir)/certs ]; then \
60 $(INSTALL) -d -m 750 $(R)$(raddbdir)/certs; \
61 $(INSTALL) -m 750 certs/bootstrap $(R)$(raddbdir)/certs; \
62 for i in Makefile README xpextensions ca.cnf server.cnf client.cnf; do \
63 $(INSTALL) -m 640 certs/$$i $(R)$(raddbdir)/certs; \
66 if [ ! -d $(R)$(raddbdir)/sql ]; then \
67 find sql -name CVS -prune -o -print | \
69 if [ -d "$$file" ]; then \
70 $(INSTALL) -d -m 750 "$(R)$(raddbdir)/$$file"; \
72 $(INSTALL) -m 640 "$$file" "$(R)$(raddbdir)/$$file"; \
76 if [ ! -f $(R)$(raddbdir)/sites-enabled/default ]; then \
77 cd $(R)$(raddbdir)/sites-enabled/; \
78 ln -s ../sites-available/default; \
80 if [ ! -f $(R)$(raddbdir)/sites-enabled/inner-tunnel ]; then \
81 cd $(R)$(raddbdir)/sites-enabled/; \
82 ln -s ../sites-available/inner-tunnel; \
86 rm -rf sites-enabled/inner-tunnel sites-enabled/default