Commands should do all the actual work
This commit is contained in:
@@ -104,6 +104,6 @@ class Mrsk::Cli::Accessory < Mrsk::Cli::Base
|
||||
desc "remove_files [NAME]", "Remove accessory directory used for uploaded files from host"
|
||||
def remove_files(name)
|
||||
accessory = MRSK.accessory(name)
|
||||
on(accessory.host) { execute :rm, "-rf", accessory.service_name }
|
||||
on(accessory.host) { execute *accessory.remove_files }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -46,6 +46,10 @@ class Mrsk::Commands::Accessory < Mrsk::Commands::Base
|
||||
).join(" "), host: host
|
||||
end
|
||||
|
||||
def remove_files
|
||||
[ :rm, "-rf", service_name ]
|
||||
end
|
||||
|
||||
def remove_container
|
||||
docker :container, :prune, "-f", *service_filter
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user