added Manually instalation
This commit is contained in:
		
							parent
							
								
									527811d2d5
								
							
						
					
					
						commit
						2f3b702e78
					
				
							
								
								
									
										57
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										57
									
								
								README.md
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -53,3 +53,60 @@ ansible-playbook ./notification.yml
 | 
			
		|||
```bash
 | 
			
		||||
rm -rf ./notification*
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Manually instalation E-Mail notification
 | 
			
		||||
 | 
			
		||||
**Dependencies:**  
 | 
			
		||||
>
 | 
			
		||||
> - [Python 3](https://www.python.org/downloads/) (tested version 3.9.5 on [Debian GNU/Linux 11](http://ftp.debian.org/debian/dists/bullseye/))
 | 
			
		||||
> - existing [/usr/local/bin/sendmail.py](https://git.hmp.today/pavel.muhortov/utils#sendmail-py)
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
# download sendmail-reboot.sh
 | 
			
		||||
sudo wget https://git.hmp.today/pavel.muhortov/notification/raw/branch/master/templates/sendmail-reboot.sh -O /etc/init.d/sendmail-reboot.sh
 | 
			
		||||
sudo chmod +x /etc/init.d/sendmail-reboot.sh
 | 
			
		||||
sudo update-rc.d sendmail-reboot.sh defaults #debian
 | 
			
		||||
sudo chkconfig --add /etc/init.d/sendmail-reboot.sh #rhel
 | 
			
		||||
 | 
			
		||||
# download sendmail-login.sh
 | 
			
		||||
sudo wget https://git.hmp.today/pavel.muhortov/notification/raw/branch/master/templates/sendmail-login.sh -O /etc/profile.d/sendmail-reboot.sh
 | 
			
		||||
sudo chmod +x /etc/profile.d/sendmail-login.sh
 | 
			
		||||
 | 
			
		||||
# edit sendmail.config
 | 
			
		||||
sudo tee /usr/local/bin/sendmail.config > /dev/null <<'EOF'
 | 
			
		||||
smtp=smtp.host.zone
 | 
			
		||||
port=587
 | 
			
		||||
from=user@host.zone
 | 
			
		||||
pass=pass
 | 
			
		||||
dest=user@host.zone
 | 
			
		||||
EOF
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Manually instalation Telegram notification
 | 
			
		||||
 | 
			
		||||
**Dependencies:**  
 | 
			
		||||
>
 | 
			
		||||
> - [curl](https://curl.se/download.html) (tested version 7.74.0 on [Debian GNU/Linux 11](http://ftp.debian.org/debian/dists/bullseye/))
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
# download sendtelegram-reboot.sh
 | 
			
		||||
sudo wget https://git.hmp.today/pavel.muhortov/notification/raw/branch/master/templates/sendtelegram-reboot.sh -O /etc/init.d/sendtelegram-reboot.sh
 | 
			
		||||
sudo chmod +x /etc/init.d/sendtelegram-reboot.sh
 | 
			
		||||
sudo update-rc.d sendtelegram-reboot.sh defaults #debian
 | 
			
		||||
sudo chkconfig --add /etc/init.d/sendtelegram-reboot.sh #rhel
 | 
			
		||||
 | 
			
		||||
# download sendtelegram-login.sh
 | 
			
		||||
sudo wget https://git.hmp.today/pavel.muhortov/notification/raw/branch/master/templates/sendtelegram-login.sh -O /etc/profile.d/sendtelegram-login.sh
 | 
			
		||||
sudo chmod +x /etc/profile.d/sendtelegram-login.sh
 | 
			
		||||
 | 
			
		||||
# edit sendtelegram.config
 | 
			
		||||
sudo tee /usr/local/bin/sendtelegram.config > /dev/null <<'EOF'
 | 
			
		||||
API_URL=https://api.telegram.org/YOURAPIKEY/sendMessage
 | 
			
		||||
SILENCE=True
 | 
			
		||||
## single chat
 | 
			
		||||
CHAT_ID=123456789
 | 
			
		||||
## chat topics
 | 
			
		||||
CHAT_ID=-100123456789
 | 
			
		||||
THRD_ID=123
 | 
			
		||||
EOF
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user