Method: Classroom#reset

Defined in:
lib/classroom/reset.rb

#reset(subject) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/classroom/reset.rb', line 2

def reset(subject)
  if subject.size != 1
    puts <<-EOF
Usage: classroom reset <password | certificates | filesync>

This tool will reset or regenerate:
* root's login password and update the /etc/issue screen
* delete and redeploy all FileSync caches
* *all* ssl certificates in the PE stack. (warning: destructive!)

EOF
    exit 1
  end

  case subject.first
  when :password
    reset_password
  when :certificates
    reset_certificates
  when :filesync
    reset_filesync
  else
    raise "Unknown action."
  end
end