Skip to content

Instantly share code, notes, and snippets.

@arzzen
Created September 16, 2016 10:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arzzen/d451a509d81357268877bbce6453821c to your computer and use it in GitHub Desktop.
Save arzzen/d451a509d81357268877bbce6453821c to your computer and use it in GitHub Desktop.
Notifikacny skript
#!/bin/bash
# Install dependences
# sudo apt-get install mailutils
# chmod +x notify.sh
RECEIVER="email@gmail.email"
SERVER_NAME=$HOSTNAME
SENDER=$(whoami)
USER="noreply"
SUBJECT="Finish torrent on server $SERVER_NAME"
TEXT="Torrent: $TR_TORRENT_NAME; User: $SENDER"
MAIL_TXT="Subject: $SUBJECT\nFrom: $SENDER\nTo: $RECEIVER\n\n$TEXT"
echo -e $MAIL_TXT | sendmail -t
exit $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment