In Files

Parent

Class/Module Index [+]

Quicksearch

Cli

owncloud-admin - the owncloud administration tool

Copyright (C) 2011 Cornelius Schumacher <schumacher@kde.org>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Public Class Methods

settings=(s) click to toggle source
# File lib/cli.rb, line 26
def self.settings= s
  @@settings = s
end

Public Instance Methods

config() click to toggle source
# File lib/cli.rb, line 42
def config
  if options[:set_server]
    puts "SET SERVER TO #{options[:set_server]}"
  else
    puts "SHOW CONFIG"
  end
end
global() click to toggle source
# File lib/cli.rb, line 31
def global
  if options[:version]
    puts "owncloud-admin: #{@@settings.version}"
  else
    Cli.help shell
  end
end
install() click to toggle source
# File lib/cli.rb, line 76
def install
  installer = Installer.new @@settings

  installer.skip_download = options["skip_download"]

  installer.server = options["server"]
  installer.ftp_user = options["ftp_user"]
  installer.ftp_password = options["ftp_password"]
  if options["root_helper"]
    installer.root_helper = options["root_helper"]
  else
    installer.root_helper = "sudo bash -c"
  end
  installer.admin_user = options["admin_user"]
  installer.admin_password = options["admin_password"]
  
  server_type = options["server_type"]

  if Installer.server_types.include? server_type
    installer.install server_type
  else
    STDERR.puts "Unsupported server type '#{server_type}."
    STDERR.puts "Supported types are: #{Installer.server_types.join(", ")}."
    exit 1
  end
end
ping() click to toggle source
# File lib/cli.rb, line 51
def ping
  puts "PING SERVER"
  # Access <owncloud-server>/status.php (will be in 2beta3)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.