Skip to content

Commit

Permalink
Move location of TelegramBot API key
Browse files Browse the repository at this point in the history
  • Loading branch information
ron.record committed Jun 23, 2024
1 parent 19fd928 commit 3fe01fd
Show file tree
Hide file tree
Showing 235 changed files with 34 additions and 237 deletions.
27 changes: 27 additions & 0 deletions bin/set_telegram_api_key
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
#
# Add your TelegramBot API key to /usr/local/MirrorCommand/etc/mirrorkeys
. /usr/local/MirrorCommand/etc/mirrorkeys

# Exit if no API key has been configured
[ "${telegramApiKey}" == "xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx" ] && exit 0

MMHOME="$1"
[ -d ${MMHOME}/modules/MMM-TelegramBot ] || {
MMHOME=
for homedir in /usr/local /home/*
do
[ "${homedir}" == "/home/*" ] && continue
[ -d ${homedir}/MagicMirror/modules/MMM-TelegramBot ] && {
MMHOME="${homedir}/MagicMirror"
break
}
done
}

[ -d ${MMHOME}/modules/MMM-TelegramBot ] && {
# Exit if an API key environment file exists
[ -f ${MMHOME}/modules/MMM-TelegramBot/.env ] && exit 0
# Set the TelegramBot API Key
echo "TELEGRAM_API_KEY=${telegramApiKey}" > ${MMHOME}/modules/MMM-TelegramBot/.env
}
5 changes: 4 additions & 1 deletion bin/showkeys
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

MMCONFDIR="/usr/local/MirrorCommand"
BINDIR="/usr/local/MirrorCommand/bin"
BINDIR="${MMCONFDIR}/bin"
QUIET=
[ "$1" == "-q" ] && QUIET=1

Expand Down Expand Up @@ -43,6 +43,9 @@ MMHOME="$HOME/MagicMirror"
showconfkeys
CONFDIR=${MMHOME}/config-landscape-notelegram
showconfkeys
[ -x ${BINDIR}/set_telegram_api_key ] && {
${BINDIR}/set_telegram_api_key "${MMHOME}"
}
}

CONFDIR=${MMCONFDIR}/config
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-babymetal.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-beauty.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-blacktape.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-bowie.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-concerts.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-dancing.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-deeppurple.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-deepthoughts.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-dualipa.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-elephantparts.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-fractalplaylist.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-hardzoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-kpop.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-lostweekend.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-massage.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-nilsson.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-organ.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-pinkfloyd.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-qotsa.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-rufus.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-sonofdracula.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-sonofschmilsson.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-televisionparts.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-tvthemes.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-veritasium.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/YouTube/config-zhu.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/config-YouTube.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/config-calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/config-default.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: false,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/config-network.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/config-networkcols.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/config-roon.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/config-traffic.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-landscape/config-weather.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config-notelegram/Templates/MMM-TelegramBot.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: false,
Expand Down
1 change: 0 additions & 1 deletion config-notelegram/telegrambot-custom-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: false,
Expand Down
1 change: 0 additions & 1 deletion config/Artists/config-Alexander_Dinh.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config/Artists/config-Aroma_Sensei.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config/Artists/config-Axsens.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config/Artists/config-Ayya_Saparniyazova.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config/Artists/config-Firolian.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config/Artists/config-Fukuro_Ko.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config/Artists/config-HooBaMon.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
1 change: 0 additions & 1 deletion config/Artists/config-Kittew.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ var config = {
{
module: 'MMM-TelegramBot',
config: {
telegramAPIKey : 'xxxxxx_Your-Telegram-API-Key_xxxxxxxxxxxxxxxxx',
allowedUser : ['Your-Telegram-Username'],
adminChatId : 0000000000,
useWelcomeMessage: true,
Expand Down
Loading

0 comments on commit 3fe01fd

Please sign in to comment.