31 lines
439 B
Go
31 lines
439 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"meow.tf/streamdeck/sdk"
|
|
"os"
|
|
)
|
|
|
|
const (
|
|
sshAction = "tf.meow.remote.ssh"
|
|
websiteAction = "tf.meow.remote.website"
|
|
)
|
|
|
|
func main() {
|
|
f, err := os.Create("log.txt")
|
|
|
|
if err == nil {
|
|
log.SetOutput(f)
|
|
}
|
|
|
|
sdk.RegisterAction(sshAction, sshActionHandler)
|
|
sdk.RegisterAction(websiteAction, serverActionHandler(websiteActionHandler))
|
|
|
|
err = sdk.Open()
|
|
|
|
if err != nil {
|
|
log.Fatalln(err)
|
|
}
|
|
|
|
sdk.Wait()
|
|
} |