-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
feb5d77
commit 3c3d3f4
Showing
3 changed files
with
40 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,43 @@ | ||
# Simple WoL bot, built on top of teloxide | ||
|
||
# Installation | ||
1. Copy systemd service to ```/etc/systemd/system/wol.service```. | ||
2. Replace workdir and path. | ||
3. Create config like ```config.json``` in workdir | ||
4. Enable and start it. | ||
1. Edit systemd service to ```/etc/systemd/system/wol.service```. | ||
2. Create config in workdir. | ||
3. Enable and start it. | ||
|
||
# Example ```config.json``` | ||
```json | ||
{ | ||
"bot_token": "telegram bot token here", | ||
"ip": "192.168.0.X", | ||
"mac": "A1:B2:C3:D4:E5:F6", | ||
"admin_id": 123456789 | ||
} | ||
``` | ||
|
||
You can get bot token from https://t.me/BotFather. | ||
|
||
User id from https://t.me/userinfobot. | ||
|
||
Get your ip and mac address from pc, that you want to turn on. | ||
|
||
# Example systemd service | ||
|
||
```unit file (systemd) | ||
[Unit] | ||
Description=Run the Wake-On-Lan (WOL) bot | ||
After=network.target | ||
[Service] | ||
Type=simple | ||
ExecStart=PATH_TO_WTP_BIN | ||
WorkingDirectory=PATH_TO_WORKDIR | ||
Restart=always | ||
RestartSec=5 | ||
StandardOutput=syslog | ||
StandardError=syslog | ||
SyslogIdentifier=wol | ||
[Install] | ||
WantedBy=multi-user.target | ||
``` |
This file was deleted.
Oops, something went wrong.