diff --git a/CT-Build/Debian.Jenkinsfile b/CT-Build/Debian.Jenkinsfile index c2c3026..c8084a8 100644 --- a/CT-Build/Debian.Jenkinsfile +++ b/CT-Build/Debian.Jenkinsfile @@ -1,4 +1,4 @@ -String[] ImgVariantList = ['minimal', 'default', 'jenkinsbuilder', 'imgbuilder', 'jenkins', 'mysql' ] +String[] ImgVariantList = ['minimal', 'default', 'jenkinsbuilder', 'imgbuilder', 'jenkins', 'mysql' , 'pihole' ] pipeline { agent { label 'LXCBuilder' } diff --git a/CT-Build/Debian.yaml b/CT-Build/Debian.yaml index 30a3b14..3f5fd73 100644 --- a/CT-Build/Debian.yaml +++ b/CT-Build/Debian.yaml @@ -870,6 +870,7 @@ files: variants: - imgbuilder - mysql + - pihole #FilesForJenkinsVariant - path: /root/ReadMe @@ -893,6 +894,13 @@ files: variants: - mysql +#FileForPihole +- path: /opt/Setup + generator: copy + source: CT-Files/pihole + variants: + - pihole + packages: manager: apt update: true @@ -990,6 +998,37 @@ packages: variants: - mysql +#pihole pkgs + - packages: + - grep + - dnsutils + - git + - iproute2 + - whiptail + - cron + - curl + - iputils-ping + - lsof + - netcat + - psmisc + - sudo + - unzip + - idn2 + - sqlite3 + - libcap2-bin + - dns-root-data + - libcap2 + - lighttpd + - php-common + - php-cli + - php-cgi + - php-sqlite3 + - php-xml + - php-intl + action: install + variants: + - pihole + repositories: - name: sources.list url: |- @@ -1051,6 +1090,7 @@ actions: rm /opt/Setup/Scripts/Init.sh variants: - mysql + - pihole - trigger: post-packages action: |- diff --git a/CT-Files/pihole/Configs/setupVars.conf b/CT-Files/pihole/Configs/setupVars.conf new file mode 100644 index 0000000..396148a --- /dev/null +++ b/CT-Files/pihole/Configs/setupVars.conf @@ -0,0 +1,7 @@ +WEBPASSWORD= +QUERY_LOGGING=true +INSTALL_WEB=true +DNSMASQ_LISTENING=single +PIHOLE_DNS_1=192.168.2.1 +PIHOLE_DNS_2=192.168.2.1 +TEMPERATUREUNIT=C \ No newline at end of file diff --git a/CT-Files/pihole/Scripts/FirstSetup.sh b/CT-Files/pihole/Scripts/FirstSetup.sh new file mode 100644 index 0000000..59c75fe --- /dev/null +++ b/CT-Files/pihole/Scripts/FirstSetup.sh @@ -0,0 +1,5 @@ +#!/bin/bash +#Finialize instaltation +/etc/.pihole/automated\ install/basic-install.sh --reconfigure --unattended +#Set password +pihole -a -p \ No newline at end of file diff --git a/CT-Files/pihole/Scripts/Init.sh b/CT-Files/pihole/Scripts/Init.sh new file mode 100644 index 0000000..4e4b712 --- /dev/null +++ b/CT-Files/pihole/Scripts/Init.sh @@ -0,0 +1,6 @@ +#!/bin/sh +mkdir -p /etc/pihole +mv /opt/Setup/Configs/setupVars.conf /etc/pihole/setupVars.conf +echo "DNSStubListener=no" >> /etc/systemd/resolved.conf +ln -s /etc/systemd/system/pihole-FTL.service /etc/systemd/system/multi-user.target.wants/pihole-FTL.service +curl -sSL https://install.pi-hole.net | curl -L https://install.pi-hole.net | bash /dev/stdin --unattended \ No newline at end of file diff --git a/Readme.md b/Readme.md index 452252d..3512d03 100644 --- a/Readme.md +++ b/Readme.md @@ -22,9 +22,10 @@ This can be done on a Minimal debian CT (make sure to enable nesting) on the new | jenkinsBuilder | Debian | Basic node for Jenkins | | imgbuilder | Debian | LXC template builder node for Jenkins | | mysql | Debian | Mysql server with PhpMyadmin | +| pihole | Debian | Pihole CT | | gitea | Alpine | Gitea server | | nginx | Alpine | Nginx server for reverse-proxy use | - +| ddns | Alpine | DDNS client configured for OVH/OVH-Cloud | ## TODO Domoticz @@ -42,8 +43,8 @@ NodeRed Omada Unifi Docker -PiHole -dDNS + + Colabora MailBackup* FileShelter/transfer.sh @@ -78,4 +79,6 @@ Then select the created credential and click save 1. Edit the parameters in the FistRun script in the container `vi /opt/Setup/Scripts/FirstRun.sh` 2. Run the FistRun scipt in the container `ash /opt/Setup/Scripts/FirstRun.sh` # nginx +1. Run the FistRun scipt in the container `ash /opt/Setup/Scripts/FirstRun.sh` +# pihole 1. Run the FistRun scipt in the container `ash /opt/Setup/Scripts/FirstRun.sh` \ No newline at end of file