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 @echo "Creating/updating files in $(R)$(raddbdir)"; \
37 for i in $(FILES) `ls sites-available/* | sed 's/CVS//'`; do \
38 [ ! -f $(R)$(raddbdir)/$$i ] && $(INSTALL) -m 640 $$i $(R)$(raddbdir)/$$i; \
39 if [ "`find $$i -newer $(R)$(raddbdir)/$$i`" ]; then \
40 echo "** $(R)$(raddbdir)/$$i"; \
46 echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
47 echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
49 echo "** The sample configuration files in `pwd`";\
50 echo "** are newer than those in $(R)$(raddbdir)";\
52 echo "** Please investigate and manually copy (if appropriate) the files listed above.";\
54 echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
55 echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
57 chmod 640 $(R)$(raddbdir)/clients.conf
58 if [ ! -d $(R)$(raddbdir)/certs ]; then \
59 $(INSTALL) -d -m 750 $(R)$(raddbdir)/certs; \
60 $(INSTALL) -m 750 certs/bootstrap $(R)$(raddbdir)/certs; \
61 for i in Makefile README xpextensions ca.cnf server.cnf client.cnf; do \
62 $(INSTALL) -m 640 certs/$$i $(R)$(raddbdir)/certs; \
65 if [ ! -d $(R)$(raddbdir)/sql ]; then \
66 find sql -name CVS -prune -o -print | \
68 if [ -d "$$file" ]; then \
69 $(INSTALL) -d -m 750 "$(R)$(raddbdir)/$$file"; \
71 $(INSTALL) -m 640 "$$file" "$(R)$(raddbdir)/$$file"; \
75 if [ ! -f $(R)$(raddbdir)/sites-enabled/default ]; then \
76 cd $(R)$(raddbdir)/sites-enabled/; \
77 ln -s ../sites-available/default; \
79 if [ ! -f $(R)$(raddbdir)/sites-enabled/inner-tunnel ]; then \
80 cd $(R)$(raddbdir)/sites-enabled/; \
81 ln -s ../sites-available/inner-tunnel; \