From 5f65fcaece2ab96a04c101e28221b2cae952215f Mon Sep 17 00:00:00 2001 From: rohieb Date: Wed, 23 Jul 2008 17:34:13 +0200 Subject: [PATCH] Makefile: config file is touched only if it doesn't exist yet, owner and file rights are set and chkdb etc. are only run if we are root. Not the group but the owner of the config file is set to www-data uG: changed Makefile --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 5ddf5b6..c9bf658 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,11 @@ links: # includes $(MKDIR) $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation $(LN) includes/*.inc $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/ - touch $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc + if [ ! -e $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc ] ; then touch $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc; fi +ifeq ($(shell id -u),0) + chmod g+w $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc + chown www-data $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc +endif # i18n if [ ! -d $(DESTDIR)/usr/share/iserv/locale/de/ ]; then $(MKDIR) $(DESTDIR)/usr/share/iserv/locale/de/; fi @@ -86,10 +90,9 @@ sourcedoc: # install everything install: sourcedoc links -ifdef $(DESTDIR) -# only useful if sql data is in the right place +ifeq ($(shell id -u),0) chmod g+w $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc - chgrp www-data $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc + chown www-data $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc chkdb -r chkpriv chklocale -- 2.20.1