-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate with router for pausing and stopping RDS/DLS
- Loading branch information
1 parent
bef0c30
commit 1177608
Showing
5 changed files
with
104 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ Author: Michael Grace <[email protected]> | |
package main | ||
|
||
import ( | ||
"flag" | ||
"os" | ||
|
||
"github.com/UniversityRadioYork/myradio-go" | ||
|
@@ -18,6 +19,9 @@ import ( | |
) | ||
|
||
func main() { | ||
dontDoSSHSession := flag.Bool("n", false, "do not start a ssh session") | ||
flag.Parse() | ||
|
||
// Load Config | ||
var config common.Config | ||
|
||
|
@@ -39,11 +43,17 @@ func main() { | |
} | ||
|
||
// Create SSH Session | ||
session.SSHSession, err = ssh.OpenSSHConnection(config) | ||
if err != nil { | ||
panic(err) | ||
if !*dontDoSSHSession { | ||
session.SSHSession, err = ssh.OpenSSHConnection(config) | ||
if err != nil { | ||
panic(err) | ||
} | ||
defer session.SSHSession.Close() | ||
} else { | ||
session.SSHSession = &ssh.SSHSession{ | ||
Config: config, | ||
} | ||
} | ||
defer session.SSHSession.Close() | ||
|
||
// URY News | ||
go session.URYNewsHandler() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters