#!/bin/sh # ===================================================================== # Projet : DARKMAKE # Fichier : generateServicesConf # Auteur : Nicolas "DarkHack" Chapuis (c) 2026 # ================== DARKHACK ================== # [ darkweb.fr - system online ] # Powered by Perplexity, your AI assistant # [https://www.perplexity.ai](https://www.perplexity.ai) # ============================================== # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ===================================================================== if ! type "shInclude" > /dev/null; then racine="${racine:-/etc/darkmake}" . /etc/darkcontainer/lib/shTools fi shLog="generateServiceConf:" shDebugEnable="1" $(shInclude $racine/web/apache2/lib-sh/apache2) #$(shInclude $racine/dns/ddns/global/vars) shDebug 1 "$*" $(shIncludeET "$racine/web/apache2/data/vars_conf") if [ ! -d "$apache2ConfGeneratedDir" ] || [ "$apache2ConfGeneratedDirClean" = "y" ];then if [ -d "$apache2ConfGeneratedDir" ];then shDebug 1 "clean:$apache2ConfGeneratedDir" rm -R $apache2ConfGeneratedDir fi mkdir -p "$apache2ConfGeneratedDir" fi confsToExecute="" confsToExecute="$confsToExecute /var/www/bakuba/vars_services" confsToExecute="$confsToExecute $racine/web/apache2/data/vars_services" for servicesConfFile in $confsToExecute;do cat $servicesConfFile apache2generateConfFile "$apache2ConfGeneratedDir" "$servicesConfFile" done #echo " #Include $racine/web/apache2/global/modules/gnutls.conf #Include $racine/web/apache2/global/modules/svn.conf #Include $racine/web/apache2/global/modules/php7.conf #" > $racine/web/apache2/data/modules_include.conf cat /usr/local/apache2/conf/httpd.conf | sed 's/.*LoadModule.*//g'\ | sed 's/User daemon/User www-data/g' | sed 's/Group daemon/Group www-data/g'\ | tr '\n' '\f'\ | sed 's/\fInclude conf\/extra\/proxy-html.conf\f<\/IfModule>/\#\r\n\#Include conf\/extra\/proxy-html.conf\r\n\#<\/IfModule>/g'\ | tr '\f' '\n' | sed '/^$/d'\ | sed 's/\# Dynamic Shared Object (DSO) Support/Include \/etc\/darksrv\/web\/apache2\/global\/modules\/modules.conf/g'\ > $racine/web/apache2/data/httpd.conf; $(which echo) -e "AddType\tapplication/x-x509-ca-cert\t.crt\r\nAddType\tapplication/x-pkcs7-crl\t\t.crl\r\nInclude /var/www/cachea2conf/start.conf"\ >> $racine/web/apache2/data/httpd.conf #cp /usr/local/apache2/conf/httpd.conf $racine/web/apache2/data cd $racine/web/apache2/data #cat $racine/web/apache2/data/httpd.conf | sed "s/#LoadModule dav_module modules\/mod_dav.so/LoadModule dav_module modules\/mod_dav.so/g" > $racine/web/apache2/data/httpd.conf.sed #mv $racine/web/apache2/data/httpd.conf.sed $racine/web/apache2/data/httpd.conf #cat $racine/web/apache2/data/httpd.conf | sed "s/#LoadModule dav_fs_module modules\/mod_dav_fs.so/LoadModule dav_fs_module modules\/mod_dav_fs.so/g" > $racine/web/apache2/data/httpd.conf.sed #mv $racine/web/apache2/data/httpd.conf.sed $racine/web/apache2/data/httpd.conf #cat $racine/web/apache2/data/httpd.conf | sed "s/#LoadModule rewrite_module modules\/mod_rewrite.so/LoadModule rewrite_module modules\/mod_rewrite.so/g" > $racine/web/apache2/data/httpd.conf.sed #mv $racine/web/apache2/data/httpd.conf.sed $racine/web/apache2/data/httpd.conf #echo "Include /var/www/cachea2conf/start.conf" >> $racine/web/apache2/data/httpd.conf