Use root in cronjob if no APACHEUSER

This commit is contained in:
Clément Oudot 2009-06-22 14:19:06 +00:00
parent f3536d4634
commit 9c22d9a295
1 changed files with 6 additions and 2 deletions

View File

@ -318,8 +318,12 @@ install_portal_site: install_conf_dir
@perl -i -pe 's#__DIR__#$(LASPPORTALDIR)/#g' $(RLASPPORTALDIR)/index.pl
# Cron files
@cp --remove-destination lemonldap-ng-portal/example/scripts/purgeCentralCache.cron.d $(RCRONDIR)/lemonldap-ng
@if [ ! "$(APACHEUSER)" ]; then APACHEUSER="root"; fi
@perl -i -pe 's#__APACHEUSER__#$(APACHEUSER)#g; s#__BINDIR__#$(BINDIR)#g;' $(RCRONDIR)/lemonldap-ng
@if [ ! "$(APACHEUSER)" ]; then \
perl -i -pe 's#__APACHEUSER__#root#g;' $(RCRONDIR)/lemonldap-ng; \
else \
perl -i -pe 's#__APACHEUSER__#$(APACHEUSER)#g;' $(RCRONDIR)/lemonldap-ng; \
fi
@perl -i -pe 's#__BINDIR__#$(BINDIR)#g;' $(RCRONDIR)/lemonldap-ng
# Clean SVN files
@rm -rf $$(find ${RPORTALDIR} $(RPORTALSKINSDIR) $(RLASPPORTALDIR) $(RCRONDIR) $(RCONFDIR) -type d -name .svn)