diff -Nur e-smith-proftpd-2.6.0.old/root/etc/e-smith/templates/etc/proftpd.conf/06ModTLS e-smith-proftpd-2.6.0/root/etc/e-smith/templates/etc/proftpd.conf/06ModTLS --- e-smith-proftpd-2.6.0.old/root/etc/e-smith/templates/etc/proftpd.conf/06ModTLS 2021-01-08 16:48:17.164000000 -0500 +++ e-smith-proftpd-2.6.0/root/etc/e-smith/templates/etc/proftpd.conf/06ModTLS 2021-01-08 16:54:35.212000000 -0500 @@ -7,15 +7,19 @@ my $tlsrequired = $ftp{'TLSRequired'} || "on"; my $tlsclient = $ftp{'TLSVerifyClient'} || "off"; #use the same crt and key of httpd - my $crt = $modSSL{'crt'} || - "/home/e-smith/ssl.crt/${SystemName}.${DomainName}.crt"; + my $defaultcrt = "/home/e-smith/ssl.crt/${SystemName}.${DomainName}.crt"; + my $defaultkey = "/home/e-smith/ssl.key/${SystemName}.${DomainName}.key"; + + my $crt = $modSSL{'crt'} || $defaultcrt; + $crt = $defaultcrt unless -e $crt; + my $key = $modSSL{'key'} || $defaultkey; + $key = $defaultkey unless -e $key; - my $key = $modSSL{'key'} || - "/home/e-smith/ssl.key/${SystemName}.${DomainName}.key"; my $chain_file = $modSSL{CertificateChainFile} || "# no chain cert"; + $chain_file = "# no chain cert" unless -e $chain_file; - $chain_file = ( $chain_file eq "# no chain cert" )? $chain_file : "TLSCertificateChainFile $chain_file"; + $chain_file = ( $chain_file eq "# no chain cert" )? $chain_file : "TLSCertificateChainFile $chain_file"; $OUT .= <