Commits

Scott Morningstar committed c80b0a9

added ssh_port to config

  • Participants
  • Parent commits 554a5d8

Comments (0)

Files changed (3)

         self.compression = kwargs.pop('compression', 'gzip')
         self.sudo_user = kwargs.pop('sudo_user', '')
         self.fmod = kwargs.pop('fmod', 0600)
+        self.ssh_port = kwargs.pop('ssh_port', None)
         databases = kwargs.pop('databases', [])
         self.databases = set(databases)
         if not os.path.exists(self.dest):
         remote_cmd = ['ssh -C']
         if self.user:
             remote_cmd.extend(['-l', self.user])
+        if self.ssh_port:
+            remote_cmd.extend(['-p', self.ssh_port])
         remote_cmd.extend([self.host, cmd])
         self.logger.debug(remote_cmd)
         return self.execute(' '.join(remote_cmd), **kwargs)

scripts/dbbu-run.py

         data = {'host': host[5:]}
         if cfg.has_option(host, 'user'):
             data['user'] = cfg.get(host, 'user')
+        if cfg.has_option(host, 'ssh_port'):
+            data['ssh_port'] = cfg.get(host, 'ssh_port')
         if cfg.has_option(host, 'sudo_user'):
             data['sudo_user'] = cfg.get(host, 'sudo_user')
         data.update(shared)
 
 setup(
     name="dbbu",
-    version="0.1.0",
+    version="0.1.1",
     packages=find_packages(),
     scripts=[
         'scripts/dbbu-run.py',