1
0
Fork
You've already forked LinuxExecBot
0
Telegram bot to execute a command from a configurable list
  • Go 90.3%
  • Makefile 6.3%
  • Shell 3.4%
2026年04月01日 01:11:57 +07:00
.github Move to Goreleaser 2026年03月22日 04:17:27 +07:00
cmd/LinuxExecBot Multiuser support 2023年07月15日 01:34:57 +07:00
configs Move to Goreleaser 2026年03月22日 04:17:27 +07:00
internal Release 1.2.2 2026年04月01日 00:54:02 +07:00
.gitignore Read config 2022年12月01日 22:37:17 +07:00
.goreleaser.yaml Goreleaser fix 2026年03月22日 04:30:35 +07:00
.version Release 1.2.2 2026年04月01日 00:54:02 +07:00
CHANGELOG.md Release 1.2.2 2026年04月01日 00:54:02 +07:00
go.mod Release 1.2.1 2026年03月22日 02:08:00 +07:00
go.sum Release 1.2.1 2026年03月22日 02:08:00 +07:00
LICENSE Initial commit 2022年12月01日 21:30:01 +07:00
Makefile Send command arguments 2023年06月06日 21:14:08 +07:00
README.md README upd 2026年04月01日 01:11:57 +07:00

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

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

  1. 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 desc field will be shown in Bot Menu.
/help command lists all available commands

  1. Enable and start service
systemctl enable linuxexecbot.service
systemctl start linuxexecbot.service
  1. Go to your bot in Telegram and try to execute command. Example: /la

As user

  1. Copy config example
mkdir -p ~/.config/LinuxExecBot
cp /etc/LinuxExecBot/config.yaml ~/.config/LinuxExecBot/config.yaml
  1. Edit config.yaml, put your bot's Token and ChatID there
  2. Enable and start service, replace MYUSER with your username
systemctl enable linuxexecbot@MYUSER.service
systemctl start linuxexecbot@MYUSER.service
  1. Go to your bot in Telegram and try to execute command.

3. Options

Key Description Default
-c Path to config yaml file config.yaml