sh some_task.sh; ntfy send "Finished"
Notification is possible like
If you already have a running process,
pstree -p
Check the process ID with etc.
while kill -0 <PID> 2> /dev/null; do sleep 1; done; ntfy send "Finished"
Can be notified with
This time, we will notify the room of # general
[https://api.slack.com/web#authentication] (https://api.slack.com/web#authentication) Can be created here
Get ready to use pip
- '2.7'
- '3.3'
- '3.4'
- '3.5'
Looking at travis.yml, it seems that it can be executed with the above version.
sudo pip install ntfy
echo 'eval "$(ntfy shell-integration)"' >> ~/.bashrc
source ~/.bashrc
---
backends:
- slack
slack:
token: slacktoken
recipient: "#general"
$ ntfy send "test"
Now it's OK if it's posted on Slack!
Recommended Posts