Prepare Coulobre Core 1.1.0 #232
No files matched your search
@@ -940,6 +940,13 @@ class Installer:
|
||||
ASSETS,
|
||||
*features,
|
||||
label="Configure local hosting tools",
|
||||
failure=lambda _code, stderr: (
|
||||
stderr.decode("utf-8", errors="replace")
|
||||
.strip()
|
||||
.splitlines()[-1][:400]
|
||||
if stderr.strip()
|
||||
else "Check the local hosting tools and retry."
|
||||
),
|
||||
).splitlines()
|
||||
workers.extend(local_workers)
|
||||
self.folder_sftp_supported = (
|
||||
|
||||
@@ -201,7 +201,13 @@ def prepare_sftp(assets, command):
|
||||
|
||||
if not SSHD.is_file():
|
||||
raise ValueError("Install OpenSSH Server before enabling SFTP.")
|
||||
command(str(SSHD), "-t")
|
||||
require_root_directory(Path("/run/sshd"), create_mode=0o755)
|
||||
try:
|
||||
command(str(SSHD), "-t")
|
||||
except ValueError:
|
||||
raise ValueError(
|
||||
"The existing OpenSSH configuration failed sshd -t."
|
||||
) from None
|
||||
require_root_directory(AUTHORIZED_KEYS, create_mode=0o755)
|
||||
create_service_identity(SFTP_GROUP, "", command)
|
||||
created = not os.path.lexists(SFTP_SSHD_CONFIG)
|
||||
@@ -219,10 +225,12 @@ def prepare_sftp(assets, command):
|
||||
command(str(SSHD), "-t")
|
||||
if active("ssh.service"):
|
||||
command(SYSTEMCTL, "reload", "ssh.service")
|
||||
except (OSError, ValueError):
|
||||
except (OSError, ValueError) as error:
|
||||
if created:
|
||||
SFTP_SSHD_CONFIG.unlink()
|
||||
raise
|
||||
raise ValueError(
|
||||
"Could not validate or reload the Coulobre OpenSSH configuration."
|
||||
) from error
|
||||
|
||||
|
||||
def check_folder_sftp_filesystem():
|
||||
|
||||
@@ -331,6 +331,9 @@ def unpack_roundcube(command):
|
||||
):
|
||||
raise ValueError("Roundcube has an unexpected archive layout.")
|
||||
source.extractall(staging, members=files, filter="data")
|
||||
for member in files:
|
||||
if member.isdir():
|
||||
(staging / member.name).chmod(0o755)
|
||||
app = staging / root
|
||||
write_new_file(
|
||||
app / ".coulobre-release", ROUNDCUBE_VERSION, mode=0o644
|
||||
|
||||
Reference in new issue
Block a user