2019-05-21 04:06:20 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
"meow.tf/streamdeck/sdk"
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
sshAction = "tf.meow.remote.ssh"
|
|
|
|
websiteAction = "tf.meow.remote.website"
|
2019-05-21 23:50:47 +00:00
|
|
|
openAction = "tf.meow.remote.open"
|
2019-05-21 04:06:20 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
f, err := os.Create("log.txt")
|
|
|
|
|
|
|
|
if err == nil {
|
|
|
|
log.SetOutput(f)
|
|
|
|
}
|
|
|
|
|
|
|
|
sdk.RegisterAction(sshAction, sshActionHandler)
|
|
|
|
sdk.RegisterAction(websiteAction, serverActionHandler(websiteActionHandler))
|
2019-05-21 23:50:47 +00:00
|
|
|
sdk.RegisterAction(openAction, serverActionHandler(openActionHandler))
|
2019-05-21 04:06:20 +00:00
|
|
|
|
|
|
|
err = sdk.Open()
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
log.Fatalln(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
sdk.Wait()
|
|
|
|
}
|