Class: SimpleTool

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/simpletool.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



7
8
9
# File 'lib/simpletool.rb', line 7

def self.source_root
  File.dirname(__FILE__)
end

Instance Method Details

#install_phpmyadminObject



24
25
26
# File 'lib/simpletool.rb', line 24

def install_phpmyadmin

end

#install_pptp_vpnObject



12
13
14
15
16
17
18
19
20
21
# File 'lib/simpletool.rb', line 12

def install_pptp_vpn
  `sudo apt-get install --yes pptpd pptp-linux`
  copy_file 'lib/support/pptp_vpn/ubuntu/pptpd.conf', "/etc/pptpd.conf"
  copy_file 'lib/support/pptp_vpn/ubuntu/pptpd-options', "/etc/ppp/pptpd-options"
  `sudo bash -c "echo '$1 * $2 *' >> /etc/ppp/chap-secrets"`
  copy_file 'lib/support/pptp_vpn/ubuntu/sysctl.conf', "/etc/sysctl.conf"
  copy_file 'lib/support/pptp_vpn/ubuntu/rc.local', "/etc/rc.local"
  `modprobe nf_conntrack_proto_gre nf_conntrack_pptp`
  `sudo /etc/init.d/pptpd restart`
end

#install_shadowsocks_serverObject



29
30
31
# File 'lib/simpletool.rb', line 29

def install_shadowsocks_server

end

#install_zshObject



34
35
36
# File 'lib/simpletool.rb', line 34

def install_zsh

end