Skip to content

Junch25/EPGStation-Notification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EPGStation-Notification

EPGStationの録画開始・終了・エラー取得した内容をSlack・Discord通知スクリプトです。
Slack and Discord notification script for EPGStation recording start, end, and error acquisition.

CircleCI

導入手順

Slackアプリを作成

URL: https://api.slack.com

参考: https://api.slack.com/lang/ja-jp

スクリプト配置

$ git clone https://github.com/Junch25/EPGStation-Notification.git

Slackの設定

# 編集
$ 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"

EPGStationへ設定追加

$ 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"

EPGStation再起動

$ sudo pm2 restart epgstation

Build

EPGStation-NotificationというバイナリファイルできればOK

$ cd epgstation_notification
$ GOOS=linux GOARCH=amd64 go build -o "bin/epgstation-notification" main.go
$ ls bin
  epgstation-notification

License

Apache License 2.0