Created
September 16, 2016 10:01
-
-
Save arzzen/d451a509d81357268877bbce6453821c to your computer and use it in GitHub Desktop.
Notifikacny skript
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
#!/bin/bash | |
# Install dependences | |
# sudo apt-get install mailutils | |
# chmod +x notify.sh | |
RECEIVER="[email protected]" | |
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