simpletool 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/simpletool.rb +3 -2
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2bb01bc2f5ca61d6b754f448c411cbb15340640f
4
- data.tar.gz: 109c23cb61d237c25ff86468b352ff9413be894f
3
+ metadata.gz: 54af52ccdd9dfd824020eab1631b017c9045e1c8
4
+ data.tar.gz: 6a5a4b3f5625e8a0b6814db2f3812ae944977b8a
5
5
  SHA512:
6
- metadata.gz: 72e94de742fcc9d76367e7758907e16abc2f9ab53f099021788edaa32ccfbd977971c9958855be441122f614e22a3f7f0f4e4f9692db452dd8a8fa077288d632
7
- data.tar.gz: a4b6f9c01568de26b4fd4960977ce6800b503ddd45ada463b913e67d355b86fdffea19fadc43130be41904fb156385bdbb88dea06298db524c411e480d391a0d
6
+ metadata.gz: 4faadf0023af27f80902d71d22f495939bebb58880eb93e69338721a0fe1e770846f449d9348bf6bb159438ce8050b5175a0dfa3b51a9f0e3e9aa7c95e36e301
7
+ data.tar.gz: 9b21385337a3148b64a66e71492d95a4a148192712b2e9045a08c9d008e8bb3dfc873728e9dd28904227947444184f0dfd4998f124308caad2a0b41f2352b388
data/lib/simpletool.rb CHANGED
@@ -20,11 +20,12 @@ class SimpleTool < Thor
20
20
 
21
21
 
22
22
  desc "install_pptp_vpn username passwd", "quick install pptp vpn on ubuntu, need provide username & password, remember to reboot machine to check!!!"
23
- def install_pptp_vpn
23
+ def install_pptp_vpn(user, pwd)
24
+ ap "hello"
24
25
  `sudo apt-get install --yes pptpd pptp-linux`
25
26
  cp_file('support/pptp_vpn/ubuntu/pptpd.conf', '/etc/pptpd.conf', true)
26
27
  cp_file('support/pptp_vpn/ubuntu/pptpd-options', '/etc/ppp/pptpd-options', true)
27
- `sudo bash -c "echo '$1 * $2 *' >> /etc/ppp/chap-secrets"`
28
+ `sudo bash -c "echo '#{user} * #{pwd} *' >> /etc/ppp/chap-secrets"`
28
29
  cp_file('support/pptp_vpn/ubuntu/sysctl.conf', '/etc/sysctl.conf', true)
29
30
  cp_file('support/pptp_vpn/ubuntu/rc.local', '/etc/rc.local', true)
30
31
  `sudo modprobe nf_conntrack_proto_gre nf_conntrack_pptp`
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simpletool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - seaify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-19 00:00:00.000000000 Z
11
+ date: 2016-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -1787,7 +1787,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1787
1787
  version: '0'
1788
1788
  requirements: []
1789
1789
  rubyforge_project:
1790
- rubygems_version: 2.4.7
1790
+ rubygems_version: 2.4.8
1791
1791
  signing_key:
1792
1792
  specification_version: 4
1793
1793
  summary: convience simple tools for ubuntu