EPGStationの録画開始・終了・エラー取得した内容をSlack・Discord通知スクリプトです。
Slack and Discord notification script for EPGStation recording start, end, and error acquisition.
参考: https://api.slack.com/lang/ja-jp
$ git clone https://github.com/Junch25/EPGStation-Notification.git
# 編集
$ cd epgstation_notification
$ vim bin/config.yml
slack-config:
slack-token: "SLACK_API_TOKEN"
channel: "SLACK_CHANNEL_ID"
discord-config:
discord-webhook-token: "DISCORD_API_TOKEN"
discord-webhook: "DISCORD_API_WEBHOOK"
$ vim /path/to/config/config.yml
# Slack
---
recordingStartCommand: "/path/to/bin/epgstation-notification slackRecStart"
recordingFinishCommand: "/path/to/bin/epgstation-notification slackRecEnd"
recordingFailedCommand: "/path/to/bin/epgstation-notification slackRecError"
# Discord
---
recordingStartCommand: "/path/to/bin/epgstation-notification discordRecStart"
recordingFinishCommand: "/path/to/bin/epgstation-notification discordRecEnd"
recordingFailedCommand: "/path/to/bin/epgstation-notification discordRecError"
$ sudo pm2 restart epgstation
EPGStation-Notification
というバイナリファイルできればOK
$ cd epgstation_notification
$ GOOS=linux GOARCH=amd64 go build -o "bin/epgstation-notification" main.go
$ ls bin
epgstation-notification