Before executing the bot remember to export yout telegram token and your allowed users like this:
export TELEGRAM_TOKEN=your:private_token
export TELEGRAM_VALID_USERS=user1,user2,user9
export TELEGRAM_CHAT_IDS=123,1234545,123343To compile the binary, you can use the make file like this:
make release: Create a releasemake release-pi: Create a release for raspberry pimake debug: Create a release for debuggingmake clean: Clean previous builds
Copy the executable in /opt/mansionEyeBot/mansionEyeBot
Copy the init/mansioneyebot.service file in /etc/systemd/system/
Edit mansioneyebot.service and replace TELEGRAM_TOKEN, TELEGRAM_VALID_USERS,
TELEGRAM_CHAT_IDS, YEELIGHT_DESK and YEELIGHT_SALON by the real values.
Make the file executable:
sudo chmod 755 /etc/systemd/system/mansioneyebot.serviceSet auto start to the service:
sudo systemctl enable mansioneyebot.serviceStart the serivce with:
sudo systemctl start mansioneyebotStop the service with:
sudo systemctl stop mansioneyebot