File tree Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ namespace STS \Tunneler \Console ;
3
+
4
+ use Illuminate \Console \Command ;
5
+ use STS \Tunneler \Jobs \CreateTunnel ;
6
+
7
+ class TunnelerReset extends Command
8
+ {
9
+ /**
10
+ * The name and signature of the console command.
11
+ *
12
+ * @var string
13
+ */
14
+ protected $ signature = 'tunneler:reset ' ;
15
+
16
+ /**
17
+ * The console command description.
18
+ *
19
+ * @var string
20
+ */
21
+ protected $ description = 'Destroy and reconnect the SSH tunnel ' ;
22
+
23
+ /**
24
+ * Create a new command instance.
25
+ *
26
+ * @return void
27
+ */
28
+ public function __construct ()
29
+ {
30
+ parent ::__construct ();
31
+ }
32
+
33
+ /**
34
+ * Execute the console command.
35
+ *
36
+ * @return int
37
+ */
38
+ public function handle ()
39
+ {
40
+ $ tunnel = new CreateTunnel ();
41
+ return 0 ;
42
+ }
43
+ }
Original file line number Diff line number Diff line change 2
2
3
3
use Illuminate \Support \ServiceProvider ;
4
4
use STS \Tunneler \Console \TunnelerCommand ;
5
+ use STS \Tunneler \Console \TunnelerReset ;
5
6
use STS \Tunneler \Jobs \CreateTunnel ;
6
7
7
8
@@ -50,6 +51,14 @@ function ($app) {
50
51
);
51
52
52
53
$ this ->commands ('command.tunneler.activate ' );
54
+
55
+ $ this ->app ->singleton ('command.tunneler.reset ' ,
56
+ function ($ app ) {
57
+ return new TunnelerReset ();
58
+ }
59
+ );
60
+
61
+ $ this ->commands ('command.tunneler.reset ' );
53
62
}
54
63
55
64
/**
You can’t perform that action at this time.
0 commit comments