-
Notifications
You must be signed in to change notification settings - Fork 0
[WIP] Fix download link in README and add installation examples #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
20ef6f7
ff0bb98
dc69aad
7e83b41
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -17,43 +17,107 @@ | |||||||||||||||
|
|
||||||||||||||||
| ## Quick Start | ||||||||||||||||
|
|
||||||||||||||||
| ### 1. Clone and Build | ||||||||||||||||
| ### Installation Options | ||||||||||||||||
|
|
||||||||||||||||
| You can either download a pre-built binary or build from source. | ||||||||||||||||
|
|
||||||||||||||||
| #### Option 1: Download Pre-built Binary | ||||||||||||||||
|
|
||||||||||||||||
| **Linux (AMD64)** | ||||||||||||||||
| ```bash | ||||||||||||||||
| # Clone the repository | ||||||||||||||||
| git clone https://github.com/RusEu/RadminTelegramBot.git | ||||||||||||||||
| cd RadminTelegramBot | ||||||||||||||||
| # Download the release (replace v1.0.0 with the latest version) | ||||||||||||||||
| wget https://github.com/RusEu/RadminTelegramBot/releases/download/v1.0.0/server-admin-bot-linux-amd64.tar.gz | ||||||||||||||||
|
|
||||||||||||||||
| # Install Go dependencies | ||||||||||||||||
| go mod download | ||||||||||||||||
| # Extract | ||||||||||||||||
| tar -xzf server-admin-bot-linux-amd64.tar.gz | ||||||||||||||||
|
|
||||||||||||||||
| # Build the binary | ||||||||||||||||
| go build -o server-admin-bot ./cmd/bot/main.go | ||||||||||||||||
| # Move to system path | ||||||||||||||||
| sudo mv server-admin-bot-linux-amd64 /usr/local/bin/server-admin-bot | ||||||||||||||||
|
|
||||||||||||||||
| # Make executable | ||||||||||||||||
| sudo chmod +x /usr/local/bin/server-admin-bot | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| **Linux (ARM64)** | ||||||||||||||||
| ```bash | ||||||||||||||||
| # Download the release (replace v1.0.0 with the latest version) | ||||||||||||||||
| wget https://github.com/RusEu/RadminTelegramBot/releases/download/v1.0.0/server-admin-bot-linux-arm64.tar.gz | ||||||||||||||||
|
|
||||||||||||||||
| # Extract | ||||||||||||||||
| tar -xzf server-admin-bot-linux-arm64.tar.gz | ||||||||||||||||
|
|
||||||||||||||||
| # Move to system path | ||||||||||||||||
| sudo mv server-admin-bot /usr/local/bin/ | ||||||||||||||||
| sudo mv server-admin-bot-linux-arm64 /usr/local/bin/server-admin-bot | ||||||||||||||||
|
|
||||||||||||||||
| # Make executable | ||||||||||||||||
| sudo chmod +x /usr/local/bin/server-admin-bot | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| **Alternative: Download Pre-built Release** | ||||||||||||||||
| **macOS (Intel)** | ||||||||||||||||
| ```bash | ||||||||||||||||
| # Download the release (replace v1.0.0 with the latest version) | ||||||||||||||||
| curl -L https://github.com/RusEu/RadminTelegramBot/releases/download/v1.0.0/server-admin-bot-darwin-amd64.tar.gz -o server-admin-bot-darwin-amd64.tar.gz | ||||||||||||||||
|
|
||||||||||||||||
| # Extract | ||||||||||||||||
| tar -xzf server-admin-bot-darwin-amd64.tar.gz | ||||||||||||||||
|
|
||||||||||||||||
| # Move to system path | ||||||||||||||||
| sudo mv server-admin-bot-darwin-amd64 /usr/local/bin/server-admin-bot | ||||||||||||||||
|
|
||||||||||||||||
| # Make executable | ||||||||||||||||
| sudo chmod +x /usr/local/bin/server-admin-bot | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| **macOS (Apple Silicon)** | ||||||||||||||||
| ```bash | ||||||||||||||||
| # Download the latest release (replace with your architecture) | ||||||||||||||||
| wget https://github.com/RusEu/RadminTelegramBot/releases/latest/download/server-admin-bot-linux-amd64.tar.gz | ||||||||||||||||
| # Download the release (replace v1.0.0 with the latest version) | ||||||||||||||||
| curl -L https://github.com/RusEu/RadminTelegramBot/releases/download/v1.0.0/server-admin-bot-darwin-arm64.tar.gz -o server-admin-bot-darwin-arm64.tar.gz | ||||||||||||||||
|
|
||||||||||||||||
| # Extract | ||||||||||||||||
| tar -xzf server-admin-bot-linux-amd64.tar.gz | ||||||||||||||||
| tar -xzf server-admin-bot-darwin-arm64.tar.gz | ||||||||||||||||
|
|
||||||||||||||||
| # Move to system path | ||||||||||||||||
| sudo mv server-admin-bot /usr/local/bin/ | ||||||||||||||||
| sudo mv server-admin-bot-darwin-arm64 /usr/local/bin/server-admin-bot | ||||||||||||||||
|
|
||||||||||||||||
| # Make executable | ||||||||||||||||
| sudo chmod +x /usr/local/bin/server-admin-bot | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| ### 2. Configure | ||||||||||||||||
| **Windows (AMD64)** | ||||||||||||||||
| ```powershell | ||||||||||||||||
| # Download the release (replace v1.0.0 with the latest version) using PowerShell | ||||||||||||||||
| Invoke-WebRequest -Uri "https://github.com/RusEu/RadminTelegramBot/releases/download/v1.0.0/server-admin-bot-windows-amd64.zip" -OutFile "server-admin-bot-windows-amd64.zip" | ||||||||||||||||
|
|
||||||||||||||||
| # Extract (using PowerShell) | ||||||||||||||||
| Expand-Archive -Path server-admin-bot-windows-amd64.zip -DestinationPath . | ||||||||||||||||
|
|
||||||||||||||||
| # Run the executable | ||||||||||||||||
| .\server-admin-bot-windows-amd64.exe -config config.yaml | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| > **Note:** Replace `v1.0.0` with the latest version tag. Check the [releases page](https://github.com/RusEu/RadminTelegramBot/releases) for available versions. | ||||||||||||||||
|
|
||||||||||||||||
| #### Option 2: Build from Source | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| # Clone the repository | ||||||||||||||||
| git clone https://github.com/RusEu/RadminTelegramBot.git | ||||||||||||||||
| cd RadminTelegramBot | ||||||||||||||||
|
|
||||||||||||||||
| # Install Go dependencies | ||||||||||||||||
| go mod download | ||||||||||||||||
|
|
||||||||||||||||
| # Build the binary | ||||||||||||||||
| go build -o server-admin-bot ./cmd/bot/main.go | ||||||||||||||||
|
|
||||||||||||||||
| # Move to system path (Linux/macOS) | ||||||||||||||||
| sudo mv server-admin-bot /usr/local/bin/ | ||||||||||||||||
|
|
||||||||||||||||
| # Make executable (Linux/macOS) | ||||||||||||||||
| sudo chmod +x /usr/local/bin/server-admin-bot | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| ### Configuration | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| # Create config directory | ||||||||||||||||
|
|
@@ -88,7 +152,9 @@ monitoring: | |||||||||||||||
| disk_alert_threshold: 95 | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| ### 3. Create System Service | ||||||||||||||||
| #### Linux/macOS System Service | ||||||||||||||||
|
|
||||||||||||||||
| Create a systemd service file (Linux only): | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| # Create service file | ||||||||||||||||
|
|
@@ -114,7 +180,7 @@ RestartSec=5 | |||||||||||||||
| WantedBy=multi-user.target | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| ### 4. Start the Service | ||||||||||||||||
| #### Starting the Service (Linux) | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| # Reload systemd | ||||||||||||||||
|
|
@@ -128,6 +194,88 @@ sudo systemctl start server-admin-bot | |||||||||||||||
| sudo systemctl status server-admin-bot | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| #### macOS Launch Agent | ||||||||||||||||
|
|
||||||||||||||||
| For macOS, create a Launch Agent: | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| # Create LaunchAgents directory if it doesn't exist | ||||||||||||||||
| mkdir -p ~/Library/LaunchAgents | ||||||||||||||||
|
|
||||||||||||||||
| # Create launch agent plist file | ||||||||||||||||
| nano ~/Library/LaunchAgents/com.radmin.telegrambot.plist | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| Add the following configuration: | ||||||||||||||||
|
|
||||||||||||||||
| ```xml | ||||||||||||||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||||||||||||||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||||||||||||||||
| <plist version="1.0"> | ||||||||||||||||
| <dict> | ||||||||||||||||
| <key>Label</key> | ||||||||||||||||
| <string>com.radmin.telegrambot</string> | ||||||||||||||||
| <key>ProgramArguments</key> | ||||||||||||||||
| <array> | ||||||||||||||||
| <string>/usr/local/bin/server-admin-bot</string> | ||||||||||||||||
| <string>-config</string> | ||||||||||||||||
| <string>/etc/server-admin-bot/config.yaml</string> | ||||||||||||||||
|
||||||||||||||||
| <string>/etc/server-admin-bot/config.yaml</string> | |
| <string>/Users/USERNAME/Library/Application Support/server-admin-bot/config.yaml</string> |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The NSSM command syntax is incorrect. The install command should have the arguments as separate quoted strings or combined in the Application parameters. The current syntax with multiple separate quoted arguments after the executable path may not work as intended. Consider using the format: .\nssm.exe install ServerAdminBot "C:\Path\To\server-admin-bot-windows-amd64.exe" and then setting application parameters separately with .\nssm.exe set ServerAdminBot AppParameters "-config C:\Path\To\config.yaml".
| # Install the service | |
| .\nssm.exe install ServerAdminBot "C:\Path\To\server-admin-bot-windows-amd64.exe" "-config" "C:\Path\To\config.yaml" | |
| # Install the service (set executable path) | |
| .\nssm.exe install ServerAdminBot "C:\Path\To\server-admin-bot-windows-amd64.exe" | |
| # Set application parameters (configuration file) | |
| .\nssm.exe set ServerAdminBot AppParameters "-config C:\Path\To\config.yaml" |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Task Scheduler instructions use backslashes in the argument path (-config path\to\config.yaml), but this is inconsistent with the absolute paths shown elsewhere (e.g., C:\Path\To\config.yaml). For clarity, use a complete example path like -config C:\Path\To\config.yaml to match the format used in the NSSM example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The configuration path shown here is a relative path
config.yaml, but this assumes the config file is in the same directory as the executable. For consistency with the other Windows examples (lines 260, 275) and to avoid confusion, consider using an absolute path likeC:\Path\To\config.yamland adding a note that users should replace this with their actual config file location.