Added a call for non-striker machines to call check_sshd if no DBs.

Also added a check for sshd_config.d so that it doesn't error on EL8
machines.

Signed-off-by: digimer <mkelly@alteeve.ca>
main
digimer 11 months ago
parent bf693ed212
commit 14022896aa
  1. 1
      Anvil/Tools.pm
  2. 10
      tools/anvil-daemon

@ -1131,6 +1131,7 @@ sub _set_paths
provision => "/mnt/shared/provision",
temp => "/mnt/shared/temp",
},
'sshd_config.d' => "/etc/ssh/sshd_config.d",
skins => "/var/www/html/skins",
status => "/var/www/html/status",
syslinux => "/usr/share/syslinux",

@ -101,6 +101,9 @@ if (not $anvil->data->{sys}{database}{connections})
}
else
{
# Striker can't initialize us unless it can ssh into us, so make sure root login is enabled.
chech_sshd($anvil);
# Wait until we have one.
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, 'print' => 1, level => 0, key => "error_0075"});
@ -1035,6 +1038,13 @@ sub chech_sshd
{
my ($anvil) = @_;
# On EL8, the 'sshd_config.d' directory doesn't exist and root is enabled.
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { 'path::directories::sshd_config.d' => $anvil->data->{path}{directories}{'sshd_config.d'} }});
if (not -d $anvil->data->{path}{directories}{'sshd_config.d'})
{
return(0);
}
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { 'path::configs::sshd_root_password' => $anvil->data->{path}{configs}{sshd_root_password} }});
if (not -f $anvil->data->{path}{configs}{sshd_root_password})
{

Loading…
Cancel
Save