From 584deb888d9ef8b43340021b1ed3c26af577b23b Mon Sep 17 00:00:00 2001 From: casjay Date: Tue, 27 Aug 2024 13:25:23 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Committing=20everything?= =?UTF-8?q?=20that=20changed=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rootfs/root/docker/setup/03-files.sh rootfs/tmp/ rootfs/usr/local/share/template-files/config/bind/named.conf rootfs/usr/local/share/template-files/config/bind/rndc.key rootfs/usr/local/share/template-files/config/nginx/fastcgi_params rootfs/usr/local/share/template-files/config/nginx/mime.types rootfs/usr/local/share/template-files/config/nginx/nginx.conf rootfs/usr/local/share/template-files/config/php/php-fpm.conf rootfs/usr/local/share/template-files/config/php/php-fpm.d/www.conf rootfs/usr/local/share/template-files/config/php/php.ini rootfs/usr/local/share/template-files/data/bind/root.cache --- rootfs/root/docker/setup/03-files.sh | 33 ++++++++++++++----- .../config => tmp/etc}/bind/named.conf | 0 .../config => tmp/etc}/bind/rndc.key | 0 .../config => tmp/etc}/nginx/fastcgi_params | 0 .../config => tmp/etc}/nginx/mime.types | 0 .../config => tmp/etc}/nginx/nginx.conf | 0 .../config => tmp/etc}/php/php-fpm.conf | 0 .../config => tmp/etc}/php/php-fpm.d/www.conf | 0 .../config => tmp/etc}/php/php.ini | 0 .../data => tmp/var/bind}/bind/root.cache | 0 10 files changed, 25 insertions(+), 8 deletions(-) rename rootfs/{usr/local/share/template-files/config => tmp/etc}/bind/named.conf (100%) rename rootfs/{usr/local/share/template-files/config => tmp/etc}/bind/rndc.key (100%) rename rootfs/{usr/local/share/template-files/config => tmp/etc}/nginx/fastcgi_params (100%) rename rootfs/{usr/local/share/template-files/config => tmp/etc}/nginx/mime.types (100%) rename rootfs/{usr/local/share/template-files/config => tmp/etc}/nginx/nginx.conf (100%) rename rootfs/{usr/local/share/template-files/config => tmp/etc}/php/php-fpm.conf (100%) rename rootfs/{usr/local/share/template-files/config => tmp/etc}/php/php-fpm.d/www.conf (100%) rename rootfs/{usr/local/share/template-files/config => tmp/etc}/php/php.ini (100%) rename rootfs/{usr/local/share/template-files/data => tmp/var/bind}/bind/root.cache (100%) diff --git a/rootfs/root/docker/setup/03-files.sh b/rootfs/root/docker/setup/03-files.sh index 94dd5cb..3ee690f 100755 --- a/rootfs/root/docker/setup/03-files.sh +++ b/rootfs/root/docker/setup/03-files.sh @@ -37,18 +37,22 @@ if [ -d "/tmp/bin" ]; then done fi unset bin -if [ -d "/tmp/data" ]; then - for data in "/tmp/data"/*; do - name="$(basename "$data")" - echo "Installing $name to /usr/local/share/template-files/data/$name" - mkdir -p "/usr/local/share/template-files/data/$name" - copy "$data"/* "/usr/local/share/template-files/data/$name" +if [ -d "/tmp/var" ]; then + for var in "/tmp/var"/*; do + name="${var//\/tmp\/var\//}" + echo "Installing $var to /var/$name" + if [ -d "$var" ]; then + mkdir -p "/var/$name" + copy "$var"/* "/var/$name/" + else + copy "$var" "/var/$name" + fi done fi -unset data +unset var if [ -d "/tmp/etc" ]; then for config in "/tmp/etc"/*; do - name="${config//\/tmp\/etc/\/}" + name="${config//\/tmp\/etc\//}" echo "Installing $config to /etc/$name" if [ -d "$config" ]; then mkdir -p "/etc/$name" @@ -62,6 +66,19 @@ if [ -d "/tmp/etc" ]; then done fi unset config +if [ -d "/tmp/data" ]; then + for data in "/tmp/data"/*; do + name="${data//\/tmp\/data\//}" + echo "Installing $data to /usr/local/share/template-files/data" + if [ -d "$data" ]; then + mkdir -p "/usr/local/share/template-files/data/$name" + copy "$data"/* "/usr/local/share/template-files/data/$name/" + else + copy "$data" "/usr/local/share/template-files/data/$name" + fi + done +fi +unset data # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Main script diff --git a/rootfs/usr/local/share/template-files/config/bind/named.conf b/rootfs/tmp/etc/bind/named.conf similarity index 100% rename from rootfs/usr/local/share/template-files/config/bind/named.conf rename to rootfs/tmp/etc/bind/named.conf diff --git a/rootfs/usr/local/share/template-files/config/bind/rndc.key b/rootfs/tmp/etc/bind/rndc.key similarity index 100% rename from rootfs/usr/local/share/template-files/config/bind/rndc.key rename to rootfs/tmp/etc/bind/rndc.key diff --git a/rootfs/usr/local/share/template-files/config/nginx/fastcgi_params b/rootfs/tmp/etc/nginx/fastcgi_params similarity index 100% rename from rootfs/usr/local/share/template-files/config/nginx/fastcgi_params rename to rootfs/tmp/etc/nginx/fastcgi_params diff --git a/rootfs/usr/local/share/template-files/config/nginx/mime.types b/rootfs/tmp/etc/nginx/mime.types similarity index 100% rename from rootfs/usr/local/share/template-files/config/nginx/mime.types rename to rootfs/tmp/etc/nginx/mime.types diff --git a/rootfs/usr/local/share/template-files/config/nginx/nginx.conf b/rootfs/tmp/etc/nginx/nginx.conf similarity index 100% rename from rootfs/usr/local/share/template-files/config/nginx/nginx.conf rename to rootfs/tmp/etc/nginx/nginx.conf diff --git a/rootfs/usr/local/share/template-files/config/php/php-fpm.conf b/rootfs/tmp/etc/php/php-fpm.conf similarity index 100% rename from rootfs/usr/local/share/template-files/config/php/php-fpm.conf rename to rootfs/tmp/etc/php/php-fpm.conf diff --git a/rootfs/usr/local/share/template-files/config/php/php-fpm.d/www.conf b/rootfs/tmp/etc/php/php-fpm.d/www.conf similarity index 100% rename from rootfs/usr/local/share/template-files/config/php/php-fpm.d/www.conf rename to rootfs/tmp/etc/php/php-fpm.d/www.conf diff --git a/rootfs/usr/local/share/template-files/config/php/php.ini b/rootfs/tmp/etc/php/php.ini similarity index 100% rename from rootfs/usr/local/share/template-files/config/php/php.ini rename to rootfs/tmp/etc/php/php.ini diff --git a/rootfs/usr/local/share/template-files/data/bind/root.cache b/rootfs/tmp/var/bind/bind/root.cache similarity index 100% rename from rootfs/usr/local/share/template-files/data/bind/root.cache rename to rootfs/tmp/var/bind/bind/root.cache