This example turns teler into a service, then implements inotifywatch to monitor the configuration file for changes. This way teler will automatically load on start on boot, and when config.yaml changes the teler service will restart and load the changes.
- Install
inotify-tools
apt-get -y install inotify-tools-
Move
teler(binary) to/usr/local/bin -
Create folder
/opt/teler
mkdir -p /opt/teler- Put
.shandconfig.yamlfiles in that folder - Make the files executable
chmod +x teler.sh
chmod +x teler-watcher.sh- Put
.servicefiles in/etc/systemd/system/ - Reload
systemdmanager configuration
systemctl daemon-reload- Enable services
systemctl enable teler.service
systemctl enable teler-watcher.service- Adjust variable paths in
config.yamlas needed - Start services
systemctl start teler.service
systemctl start teler-watcher.service