macke topdir manageable. Default is package-default setting
diff --git a/manifests/server.pp b/manifests/server.pp
index 5731554..d15f611 100644
--- a/manifests/server.pp
+++ b/manifests/server.pp
@@ -160,6 +160,9 @@
 # [*backuppc_password*]
 # Password for the backuppc user used to access the web interface.
 #
+# [*topdir*]
+# Overwrite package default location for backuppc.
+#
 # === Examples
 #
 #  See tests folder.
@@ -208,6 +211,7 @@
   $apache_allow_from          = 'all',
   $apache_require_ssl         = false,
   $backuppc_password          = '',
+  $topdir                     = $backuppc::params::topdir
 ) {
   include backuppc::params
 
@@ -336,6 +340,14 @@
     require => Package[$backuppc::params::package],
   }
 
+  file { [$topdir, "${topdir}/.ssh"]:
+    ensure  => 'directory',
+    recurse => true,
+    owner   => 'backuppc',
+    group   => $backuppc::params::group_apache,
+    mode    => '0644',
+  }
+
   # Workaround for client exported resources that are
   # on a different osfamily. Maintain a symlink to alternative
   # config directory targets.
@@ -359,11 +371,14 @@
   }
 
   exec { 'backuppc-ssh-keygen':
-    command => "ssh-keygen -f ${backuppc::params::topdir}/.ssh/id_rsa -C 'BackupPC on ${::fqdn}' -N ''",
+    command => "ssh-keygen -f ${topdir}/.ssh/id_rsa -C 'BackupPC on ${::fqdn}' -N ''",
     user    => 'backuppc',
-    unless  => "test -f ${backuppc::params::topdir}/.ssh/id_rsa",
+    unless  => "test -f ${topdir}/.ssh/id_rsa",
     path    => ['/usr/bin','/bin'],
-    require => Package[$backuppc::params::package],
+    require => [
+        Package[$backuppc::params::package],
+        File["${topdir}/.ssh"],
+    ],
   }
 
   # BackupPC apache configuration
diff --git a/templates/config.pl.erb b/templates/config.pl.erb
index 2efa856..d3ab761 100644
--- a/templates/config.pl.erb
+++ b/templates/config.pl.erb
@@ -37,7 +37,7 @@
 <% end -%>
 <% end -%>];
 $Conf{BackupPCUser} = 'backuppc';
-$Conf{TopDir}      = '<%= scope.lookupvar('backuppc::params::topdir') %>';
+$Conf{TopDir}      = '<%= scope.lookupvar('backuppc::server::topdir') %>';
 $Conf{ConfDir}     = '<%= scope.lookupvar('backuppc::params::config_directory') %>';
 $Conf{LogDir}      = '<%= scope.lookupvar('backuppc::params::log_directory') %>';
 $Conf{InstallDir}  = '<%= scope.lookupvar('backuppc::params::install_directory') %>';