mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
ensure that ssh disconnects
This commit is contained in:
parent
d58e678dd0
commit
a48d5db958
1 changed files with 6 additions and 3 deletions
|
@ -563,9 +563,12 @@ class Site < Sequel::Model
|
|||
# Not ideal. An SoA version is in progress.
|
||||
if $config['ipfs_ssh_host'] && $config['ipfs_ssh_user']
|
||||
rbox = Rye::Box.new $config['ipfs_ssh_host'], :user => $config['ipfs_ssh_user']
|
||||
response = rbox.ipfs "sites/#{self.username.gsub(/\/|\.\./, '')}"
|
||||
output_array = response
|
||||
rbox.disconnect
|
||||
begin
|
||||
response = rbox.ipfs "sites/#{self.username.gsub(/\/|\.\./, '')}"
|
||||
output_array = response
|
||||
ensure
|
||||
rbox.disconnect
|
||||
end
|
||||
else
|
||||
line = Cocaine::CommandLine.new('ipfs', 'add -r :path')
|
||||
response = line.run path: files_path
|
||||
|
|
Loading…
Add table
Reference in a new issue