summaryrefslogtreecommitdiffstats
path: root/modules-available/rebootcontrol/inc/sshkey.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/rebootcontrol/inc/sshkey.inc.php')
-rw-r--r--modules-available/rebootcontrol/inc/sshkey.inc.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules-available/rebootcontrol/inc/sshkey.inc.php b/modules-available/rebootcontrol/inc/sshkey.inc.php
index b4e36d25..cce9b3dc 100644
--- a/modules-available/rebootcontrol/inc/sshkey.inc.php
+++ b/modules-available/rebootcontrol/inc/sshkey.inc.php
@@ -3,7 +3,7 @@
class SSHKey
{
- public static function getPrivateKey() {
+ public static function getPrivateKey(&$regen = false) {
$privKey = Property::get("rebootcontrol-private-key");
if (!$privKey) {
$rsaKey = openssl_pkey_new(array(
@@ -11,6 +11,10 @@ class SSHKey
'private_key_type' => OPENSSL_KEYTYPE_RSA));
openssl_pkey_export( openssl_pkey_get_private($rsaKey), $privKey);
Property::set("rebootcontrol-private-key", $privKey);
+ if (Module::isAvailable('sysconfig')) {
+ ConfigTgz::rebuildAllConfigs();
+ }
+ $regen = true;
}
return $privKey;
}