31 lines
830 B
Markdown
31 lines
830 B
Markdown
# synology-webhook
|
|
|
|
This is a simple webhook for Synology NAS devices. It listens for incoming webhooks and executes the specified command.
|
|
|
|
## Installation
|
|
|
|
- Copy the script and config to your Synology NAS and make it excecutable.
|
|
|
|
```bash
|
|
cd /volume1
|
|
wget https://gitlab.lino3d.de/Lino/synology-webhook/-/raw/main/synology-webhook.py
|
|
wget https://gitlab.lino3d.de/Lino/synology-webhook/-/raw/main/example.config.json -O config.json
|
|
chmod +x synology-webhook.py
|
|
```
|
|
|
|
- Edit the `config.json` file to your needs.
|
|
|
|
- Create a task in the Task Scheduler to start the script on boot.
|
|
|
|

|
|
|
|
## Shutdown
|
|
|
|
To shutdown the NAS, send a POST request to `http://<your-nas>:48080/shutdown` with the following JSON payload:
|
|
|
|
```json
|
|
{
|
|
"message": "<shutdown_keywords set in config.json>"
|
|
}
|
|
```
|