Browse Source

postfix+dkim+letsencrypt

main
pvincent 1 day ago
parent
commit
70d063dff6
  1. 6
      bin/export.bash
  2. 16
      bin/import.bash
  3. 4
      debian/install.bash

6
bin/export.bash

@ -24,8 +24,14 @@ function export_files {
tar -C / -cf "$temp_dir/files.tar" etc/sympa/sympa/sympa.conf tar -C / -cf "$temp_dir/files.tar" etc/sympa/sympa/sympa.conf
tar -C / -uf "$temp_dir/files.tar" etc/sympa/data_structure.version tar -C / -uf "$temp_dir/files.tar" etc/sympa/data_structure.version
tar -C / -uf "$temp_dir/files.tar" etc/sympa/auth.conf tar -C / -uf "$temp_dir/files.tar" etc/sympa/auth.conf
tar -C / -uf "$temp_dir/files.tar" var/lib/sympa tar -C / -uf "$temp_dir/files.tar" var/lib/sympa
tar -C / -uf "$temp_dir/files.tar" var/spool/sympa tar -C / -uf "$temp_dir/files.tar" var/spool/sympa
tar -C / -uf "$temp_dir/files.tar" etc/postfix/main.cf
tar -C / -uf "$temp_dir/files.tar" etc/dkimkeys/mail.private
tar -C / -uf "$temp_dir/files.tar" etc/letsencrypt
gzip "$temp_dir/files.tar" gzip "$temp_dir/files.tar"
} }

16
bin/import.bash

@ -63,16 +63,23 @@ function import_files_etc {
replace_conf_entry_from_export lang replace_conf_entry_from_export lang
} }
function import_files_lib {
function import_files_sympa_lib {
rm -rf /var/lib/sympa rm -rf /var/lib/sympa
mv var/lib/sympa /var/lib mv var/lib/sympa /var/lib
} }
function import_files_spool {
function import_files_sympa_spool {
rm -rf /var/spool/sympa rm -rf /var/spool/sympa
mv var/spool/sympa /var/spool mv var/spool/sympa /var/spool
} }
function import_files_postfix {
mv etc/postfix/main.cf /etc/postfix/
mv etc/dkimkeys/mail.private /etc/dkimkeys/
rm -rf /etc/letsencrypt
mv etc/letsencrypt /etc
}
function import_files { function import_files {
echo -n "import files..." echo -n "import files..."
@ -82,8 +89,9 @@ function import_files {
tar -xf "$export_tmp/files.tar.gz" tar -xf "$export_tmp/files.tar.gz"
import_files_etc import_files_etc
import_files_lib
import_files_spool
import_files_sympa_lib
import_files_sympa_spool
import_files_postfix
echo OK echo OK
} }

4
debian/install.bash

@ -5,4 +5,6 @@
# execute as root or use `sudo` # execute as root or use `sudo`
[[ $(id -u) != 0 ]] && exec sudo $(dirname "$0")/$(basename "$0") [[ $(id -u) != 0 ]] && exec sudo $(dirname "$0")/$(basename "$0")
echo TODO...
apt install -y postfix postgresql nginx fcgiwrap perl-doc certbot
echo TO BE continued...
Loading…
Cancel
Save