mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
openssh: add $verbose #1480
This commit is contained in:
parent
b46a48f10d
commit
f760f0f7b5
@ -156,14 +156,20 @@ function openssh_configure_do($verbose = false)
|
||||
$sshconf .= "HostKey {$file}\n";
|
||||
}
|
||||
|
||||
/* Write the new sshd config file */
|
||||
file_put_contents("/usr/local/etc/ssh/sshd_config", $sshconf);
|
||||
|
||||
/* Launch new server process */
|
||||
echo "Reloading sshd...";
|
||||
if ($verbose) {
|
||||
echo 'Configuring OpenSSH...';
|
||||
flush();
|
||||
}
|
||||
|
||||
if (mwexecf('/usr/bin/protect -i /usr/local/sbin/sshd')) {
|
||||
echo "failed.\n";
|
||||
if ($verbose) {
|
||||
echo "failed.\n";
|
||||
}
|
||||
} else {
|
||||
echo "done.\n";
|
||||
if ($verbose) {
|
||||
echo "done.\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Scott K Ullrich
|
||||
* Copyright (C) 2004 Fred Mol <fredmol@xs4all.nl>.
|
||||
* Copyright (C) 2015-2016 Franco Fichtner <franco@opnsense.org>
|
||||
* Copyright (C) 2015-2017 Franco Fichtner <franco@opnsense.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -33,4 +33,4 @@ require_once('config.inc');
|
||||
require_once('util.inc');
|
||||
require_once('plugins.inc.d/openssh.inc');
|
||||
|
||||
openssh_configure_do();
|
||||
openssh_configure_do(true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user