aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/carp_settings.xml11
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/carp_settings.xml b/packages/carp_settings.xml
index befd3049..fce0262d 100644
--- a/packages/carp_settings.xml
+++ b/packages/carp_settings.xml
@@ -118,6 +118,17 @@
<custom_delete_php_command>
</custom_delete_php_command>
<custom_php_install_command>
+ system("/bin/mkdir -p /root/.ssh");
+ if($_POST['knownhosts'] != "") {
+ $fout = fopen("/root/.ssh/known_hosts","w");
+ fwrite($fout, $_POST['knownhosts']);
+ fclose($fout);
+ }
+ if($_POST['authorizedkeys'] != "") {
+ $fout = fopen("/root/.ssh/authorized_keys","w");
+ fwrite($fout, $_POST['authorizedkeys']);
+ fclose($fout);
+ }
</custom_php_install_command>
<custom_php_deinstall_command>
</custom_php_deinstall_command>