pull/1/head
Philipp Heckel 2021-10-27 14:58:38 -04:00
parent a38aca47bd
commit 28fb63b9ae
1 changed files with 7 additions and 7 deletions

View File

@ -29,8 +29,8 @@ curl -s ntfy.sh/mytopic/sse
You can easily script it to execute any command when a message arrives. This sends desktop notifications (just like You can easily script it to execute any command when a message arrives. This sends desktop notifications (just like
the web UI, but without it): the web UI, but without it):
``` ```
while read msg; do while read msg; do
notify-send "$msg" [ -n "$msg" ] && notify-send "$msg"
done < <(stdbuf -i0 -o0 curl -s ntfy.sh/mytopic/raw) done < <(stdbuf -i0 -o0 curl -s ntfy.sh/mytopic/raw)
``` ```
@ -64,13 +64,13 @@ sudo apt install ntfy
**Debian/Ubuntu** (*manual install*)**:** **Debian/Ubuntu** (*manual install*)**:**
```bash ```bash
sudo apt install tmux sudo apt install tmux
wget https://github.com/binwiederhier/ntfy/releases/download/v0.0.4/ntfy_0.0.4_amd64.deb wget https://github.com/binwiederhier/ntfy/releases/download/v1.0.0/ntfy_1.0.0_amd64.deb
dpkg -i ntfy_0.0.4_amd64.deb dpkg -i ntfy_1.0.0_amd64.deb
``` ```
**Fedora/RHEL/CentOS:** **Fedora/RHEL/CentOS:**
```bash ```bash
rpm -ivh https://github.com/binwiederhier/ntfy/releases/download/v0.0.4/ntfy_0.0.4_amd64.rpm rpm -ivh https://github.com/binwiederhier/ntfy/releases/download/v1.0.0/ntfy_1.0.0_amd64.rpm
``` ```
**Docker:** **Docker:**
@ -85,8 +85,8 @@ go get -u heckel.io/ntfy
**Manual install** (*any x86_64-based Linux*)**:** **Manual install** (*any x86_64-based Linux*)**:**
```bash ```bash
wget https://github.com/binwiederhier/ntfy/releases/download/v0.0.4/ntfy_0.0.4_linux_x86_64.tar.gz wget https://github.com/binwiederhier/ntfy/releases/download/v1.0.0/ntfy_1.0.0_linux_x86_64.tar.gz
sudo tar -C /usr/bin -zxf ntfy_0.0.4_linux_x86_64.tar.gz ntfy sudo tar -C /usr/bin -zxf ntfy_1.0.0_linux_x86_64.tar.gz ntfy
./ntfy ./ntfy
``` ```