X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage5%2Fpkg%2Fapache;h=4e8c1dc677e25a98ffb80e8de392eb4b713970c5;hb=bdd3347ff8920ece383a232d12aef0d3720c8bff;hp=ee38f226bdde7c5073b6a6065cf8158c70ba1d0b;hpb=fdeecdbf2bb61fe70e4783d4c20fbebac7a8830b;p=hvlinux.git diff --git a/stage5/pkg/apache b/stage5/pkg/apache index ee38f22..4e8c1dc 100644 --- a/stage5/pkg/apache +++ b/stage5/pkg/apache @@ -32,9 +32,9 @@ hvconfig_pre() EOF - groupadd -f ${APACHE_USER} - hv_useradd -c WebServer -d /dev/null -g ${APACHE_USER} -s /bin/false \ - ${APACHE_USER} + groupadd --system -f ${HTTPD_USER} + hv_useradd --system -c WebServer -d /dev/null -g ${HTTPD_USER} \ + -s /bin/false ${HTTPD_USER} CONFIGURE_OPTS=" \ --enable-layout=FHS \ @@ -64,8 +64,8 @@ hvbuild_post() # Modifying the configuration file to run the server as a dedicated user: sed -i \ - -e "s!^\(User\).*!\1 ${APACHE_USER}!g" \ - -e "s!^\(Group\).*!\1 ${APACHE_USER}!g" \ + -e "s!^\(User\).*!\1 ${HTTPD_USER}!g" \ + -e "s!^\(Group\).*!\1 ${HTTPD_USER}!g" \ ${CONFDIR}/httpd.conf # SSL Certificates generation script @@ -134,11 +134,13 @@ EOF sed -i -e "s!^ServerAdmin .*!ServerAdmin webmaster@${DOMAIN}!" ${CONFDIR}/ssl/ssl.conf sed -i -e "s!${CONFDIR}!${CONFDIR}/ssl!" ${CONFDIR}/ssl/ssl.conf - chown -v -R ${APACHE_USER}:${APACHE_USER} /srv/www + chown -v -R ${HTTPD_USER}:${HTTPD_USER} /srv/www # Bootscript install -v -m740 ${SCRDIR}/bootscripts/apache /etc/rc.d/init.d # script-name start stop - bootscript_add_rc3 apache 70 20 + if [ "x${DEFAULT_WEB_SERVER}" == "xhttpd" ]; then + bootscript_add_rc3 apache 70 20 + fi }