Telegram bot to execute a command from a configurable list
- Go 90.3%
- Makefile 6.3%
- Shell 3.4%
|
|
||
|---|---|---|
| .github | Move to Goreleaser | |
| cmd/LinuxExecBot | Multiuser support | |
| configs | Move to Goreleaser | |
| internal | Release 1.2.2 | |
| .gitignore | Read config | |
| .goreleaser.yaml | Goreleaser fix | |
| .version | Release 1.2.2 | |
| CHANGELOG.md | Release 1.2.2 | |
| go.mod | Release 1.2.1 | |
| go.sum | Release 1.2.1 | |
| LICENSE | Initial commit | |
| Makefile | Send command arguments | |
| README.md | README upd | |
Go Report Card Maintainability Codacy Badge Binary-release GitHub
LinuxExecBot
Telegram bot to execute a command from a configurable list on your Linux machine
1. Installation
2. Usage
3. Options
1. Installation
From .deb repository (recommended)
curl -s --compressed "https://aceberg.github.io/ppa/KEY.gpg" | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/aceberg.gpg
sudo curl -s --compressed -o /etc/apt/sources.list.d/aceberg.list "https://aceberg.github.io/ppa/aceberg.list"
sudo apt update && sudo apt install linuxexecbot
From .deb file
Download latest release, install with your package maneger
From .tar.gz
Download latest release, then
tar xvzf LinuxExecBot-*.tar.gz
cd LinuxExecBot
sudo ./install.sh
With go
go install github.com/aceberg/LinuxExecBot/cmd/LinuxExecBot@latest
2. Usage
As root
- Edit
/etc/LinuxExecBot/config.yaml, put your Telegram bot's Token and ChatID there. Add your commands. Example:
config:token:5XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXsocks5:"127.0.0.1:1080"# Optional Socks5 proxy#id: 111111111 ids:# Use either id (for one user) or ids (for several bot users)- 111111111- 222222222args:no# If set to "yes", allows to send arguments with bot commands# WARNING! Could be dangerous, if someone gets access to your botcommands:- name:laexec:"ls -al"desc:"List all files"- name:pingexec:"ping -c 3 8.8.8.8"desc:"Ping Google DNS"Only commands with not empty
descfield will be shown in Bot Menu.
/helpcommand lists all available commands
- Enable and start service
systemctl enable linuxexecbot.service
systemctl start linuxexecbot.service
- Go to your bot in Telegram and try to execute command. Example:
/la
As user
- Copy config example
mkdir -p ~/.config/LinuxExecBot
cp /etc/LinuxExecBot/config.yaml ~/.config/LinuxExecBot/config.yaml
- Edit
config.yaml, put your bot's Token and ChatID there - Enable and start service, replace
MYUSERwith your username
systemctl enable linuxexecbot@MYUSER.service
systemctl start linuxexecbot@MYUSER.service
- Go to your bot in Telegram and try to execute command.
3. Options
| Key | Description | Default |
|---|---|---|
| -c | Path to config yaml file | config.yaml |