summaryrefslogtreecommitdiffstats
path: root/modules-available/rebootcontrol/inc
diff options
context:
space:
mode:
authorSimon Rettberg2017-11-03 17:49:58 +0100
committerSimon Rettberg2017-11-03 17:49:58 +0100
commit4aad3f3e894a061ee94f5386dd9256051491fa4a (patch)
tree030b40ac1c01fec0717cf0b16b173db33f43e38a /modules-available/rebootcontrol/inc
parent[inc/event] Don't try to start DozmodLauncher task - doesn't exist (diff)
downloadslx-admin-4aad3f3e894a061ee94f5386dd9256051491fa4a.tar.gz
slx-admin-4aad3f3e894a061ee94f5386dd9256051491fa4a.tar.xz
slx-admin-4aad3f3e894a061ee94f5386dd9256051491fa4a.zip
[rebootcontrol] Conditional rebuild of config.tgz, proper permissions for authorized_keys
Diffstat (limited to 'modules-available/rebootcontrol/inc')
-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;
}