Once I had to collect gentoo on a very old gland, and I was constantly tormented by the question: “How can I do this so that I know when the compilation of all the packages is finished and I can start further work with a PC?” In search of the truth I found the most A suitable solution for me is sending SMS notifications.
There are 2 solutions:
1. Sending letters to the box selected by your OPPOS (for a megaphone this service was called “GSM Email”)
2. Sending letters using a script that uses the mailagent function.
The first way is simple:
The whole essence of this method is to enable this service, get the address of the provided mail (as a rule, <your number> @ <OPPOS domain in your region>), and set up sending email to this address. All messages sent to it will come in the form of SMS to your phone. But unfortunately, not all operators provide this service. First of all, you need to clarify whether your PPSP provides it or not.
')
Therefore, we turn to the second more universal method:
The script was found a long time ago on the Internet, I don’t remember the name of the author, and all the links leading to the page are already broken. Written in python and works through the mail.ru service.
Although I called the method more universal, but in any country send SMS will not work. Here is a list of countries and operators available for sending:
help.mail.ru/agent-help/sms/regionThe maximum length of a message in Russian is 36 characters, and in Latin - 116.
The maximum amount is also limited - 10 SMS per day, and no more than one message per minute.
Actually for sending SMS we will need:
1. The script itself
www.mediafire.com/?c8hgr1krl52r56b ompldr.org/vZjdpOA vk.com/doc12641155_123767095?hash=1c85e455375bce51182. Python
3. Box on mail.ru
Unpack the archive.
It contains the original send.py script, with which you can send SMS, and my small script noty_send.sh to facilitate sending notifications.
When you call send.py without parameters, it will immediately give you the necessary information to send:
$ python sms_send/send.py Usage: send.py [options] Options: -h, --help show this help message and exit -n PHONE, --number=PHONE Phone number. Ex: +79221412345 -t TEXT, --text=TEXT Sms content -l LOGIN, --login=LOGIN Email address -p PASSWD, --password=PASSWD Your password
As for my script: open it in a text editor
Change num to your number, log to your email and pas to the password from it. You can also assign the msg variable a static phrase in the spirit of “Everything is ready, Master” to call the script without a parameter.
It is time to check the script:
$ ./noty_send.sh ", , "