tmuxme 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/TODO.md +7 -0
- data/bin/tmuxme +22 -0
- data/lib/tmuxme/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05459a1c8b370b7e1745127533ca9914ee71c236
|
4
|
+
data.tar.gz: a75da8123b708aefa6ee7b315916285c4b999182
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c23f7b92e25440f310fa042a37c60a33d4ed0fd4f473c91cff9eb1eb63f9bf89cad4ee80f9660f168210ca0a2b6bfd0e62b5c0ec7423411476d340190f092ab
|
7
|
+
data.tar.gz: 8540192d0573b77822b71b1170c531bee7b1a03580238455e4e05dbd731aa95834cc0c371c46d73f8fb94abbbf4bef94265a6031db840bcc7c82e1033cec3c41
|
data/TODO.md
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
# Things that need doing
|
2
|
+
|
3
|
+
- Add logic at the top of the client that verifies that Remote Login is
|
4
|
+
enabled and that the running user is listed in the access list. If it is not
|
5
|
+
enabled then prompt the user to ask them if they want to enable it. If they
|
6
|
+
don't then exit tmuxme. If they do enable it then make sure they are in the
|
7
|
+
access list. If they aren't add them to the access list.
|
data/bin/tmuxme
CHANGED
@@ -22,6 +22,16 @@ if ARGV.length < 1
|
|
22
22
|
exit
|
23
23
|
end
|
24
24
|
|
25
|
+
# Check if remote login is enabled
|
26
|
+
`netstat -an | grep "*\.22" | grep tcp4 | grep LISTEN`
|
27
|
+
if $? != 0
|
28
|
+
# didn't find it listening on port 22
|
29
|
+
puts "Error: Remote Login is not enabled"
|
30
|
+
puts "tmuxme requires Remote Login to be enabled for this user."
|
31
|
+
puts "Please enable Remote Login in System Preferences -> Sharing -> Remote Login and try again."
|
32
|
+
exit
|
33
|
+
end
|
34
|
+
|
25
35
|
invitees = ARGV.dup
|
26
36
|
pairers = []
|
27
37
|
|
@@ -29,6 +39,18 @@ remote_port = nil
|
|
29
39
|
remote_port_lock = Mutex.new
|
30
40
|
|
31
41
|
begin
|
42
|
+
|
43
|
+
# Make sure the ~/.ssh directory exists
|
44
|
+
if !File.directory?("#{ENV['HOME']}/.ssh")
|
45
|
+
FileUtils.mkdir_p("#{ENV['HOME']}/.ssh", :mode => 0700)
|
46
|
+
end
|
47
|
+
|
48
|
+
# Make sure the ~/.ssh/authorized_keys file exists
|
49
|
+
if !File.exists?("#{ENV['HOME']}/.ssh/authorized_keys")
|
50
|
+
FileUtils.touch("#{ENV['HOME']}/.ssh/authorized_keys")
|
51
|
+
FileUtils.chmod(0600, "#{ENV['HOME']}/.ssh/authorized_keys")
|
52
|
+
end
|
53
|
+
|
32
54
|
# back up users authorized_keys file
|
33
55
|
if !File.exists?("#{ENV['HOME']}/.ssh/authorized_keys.tmuxme.original")
|
34
56
|
puts "- Backing up ~/.ssh/authorized_keys to ~/.ssh/authorized_keys.tmuxme.original to store it the first time tmuxme was run"
|
data/lib/tmuxme/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tmuxme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew De Ponte
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -81,6 +81,7 @@ files:
|
|
81
81
|
- LICENSE.txt
|
82
82
|
- README.md
|
83
83
|
- Rakefile
|
84
|
+
- TODO.md
|
84
85
|
- bin/tmuxme
|
85
86
|
- lib/tmuxme.rb
|
86
87
|
- lib/tmuxme/version.rb
|