Skip to content

Commit

Permalink
Merge pull request #14 from owncloud/cernbox-scp_port
Browse files Browse the repository at this point in the history
Allow to specify the ssh port for scp command (primarily for owncloud log scrape function).
  • Loading branch information
moscicki committed May 5, 2015
2 parents 2ce892d + 18af46e commit 00bf8b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions etc/smashbox.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,7 @@ del os
# set it to True or False to override
#
pycurl_verbose = None

#
# scp port to be used in scp commands, used primarily when copying over the server log file
scp_port=22
2 changes: 1 addition & 1 deletion python/smashbox/utilities/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def scrape_log_file(d):
:param d: The directory where the server log file is to be copied to
"""
cmd = 'scp root@%s:%s/owncloud.log %s/.' % (config.oc_server, config.oc_server_datadirectory, d)
cmd = 'scp -P %d root@%s:%s/owncloud.log %s/.' % (config.scp_port, config.oc_server, config.oc_server_datadirectory, d)
rtn_code = runcmd(cmd)

logger.info('copy command returned %s', rtn_code)
Expand Down

0 comments on commit 00bf8b0

Please sign in to comment.