Fix proftpd install on Ubuntu 22.04

This commit is contained in:
VirtuBox
2022-10-24 15:01:51 +02:00
parent f867e8ee33
commit ff05988a97
2 changed files with 195 additions and 16 deletions

View File

@@ -1395,18 +1395,10 @@ def post_pref(self, apt_packages, packages, upgrade=False):
msg="Adding ProFTPd into Git")
if os.path.isfile("/etc/proftpd/proftpd.conf"):
Log.debug(self, "Setting up Proftpd configuration")
WOFileUtils.searchreplace(
self, "/etc/proftpd/proftpd.conf",
"# DefaultRoot", "DefaultRoot")
WOFileUtils.searchreplace(
self, "/etc/proftpd/proftpd.conf",
"# RequireValidShell", "RequireValidShell")
WOFileUtils.searchreplace(
self, "/etc/proftpd/proftpd.conf",
"# PassivePorts "
"49152 65534",
"PassivePorts "
" 49000 50000")
data = dict()
WOTemplate.deploy(self,
'/etc/proftpd/proftpd.conf',
'proftpd.mustache', data)
# proftpd TLS configuration
if not os.path.isdir("/etc/proftpd/ssl"):
WOFileUtils.mkdir(self, "/etc/proftpd/ssl")
@@ -1416,10 +1408,6 @@ def post_pref(self, apt_packages, packages, upgrade=False):
data = dict()
WOTemplate.deploy(self, '/etc/proftpd/tls.conf',
'proftpd-tls.mustache', data)
WOFileUtils.searchreplace(self, "/etc/proftpd/"
"proftpd.conf",
"#Include /etc/proftpd/tls.conf",
"Include /etc/proftpd/tls.conf")
WOService.restart_service(self, 'proftpd')
if os.path.isfile('/etc/ufw/ufw.conf'):