Initial commit
This commit is contained in:
33
WF/email_notice.WF
Executable file
33
WF/email_notice.WF
Executable file
@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
file=/tmp/mail_ip-up$$
|
||||
|
||||
echo "" >> $file
|
||||
echo " ********************************************************" >> $file
|
||||
echo " *** This is an autogenerated mail from `hostname -f` ***" >> $file
|
||||
echo "" >> $file
|
||||
echo " I brought up the ppp-daemon with the following" >> $file
|
||||
echo -e " parameters:\n" >> $file
|
||||
echo -e "\tInterface name...............: $PPP_IFACE" >> $file
|
||||
echo -e "\tThe tty......................: $PPP_TTY" >> $file
|
||||
echo -e "\tThe link speed...............: $PPP_SPEED" >> $file
|
||||
echo -e "\tLocal IP number..............: $PPP_LOCAL" >> $file
|
||||
echo -e "\tPeer IP number..............: $PPP_REMOTE" >> $file
|
||||
if [ "$USEPEERDNS" ] && [ "$DNS1" ] ; then
|
||||
echo -e "\tNameserver 1.................: $DNS1" >> $file
|
||||
if [ "$DNS2" ] ; then
|
||||
echo -e "\tNameserver 2.................: $DNS2" >> $file
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
echo -e "\tOptional \"ipparam\" value.....: $PPP_IPPARAM" >> $file
|
||||
echo "" >> $file
|
||||
echo -e "\tDate.........................: `date +\"%d.%m.%Y\"`" >> $file
|
||||
echo -e "\tTime.........................: `date +\"%H:%M:%S\"`" >> $file
|
||||
echo "" >> $file
|
||||
echo " ********************************************************" >> $file
|
||||
|
||||
/bin/echo -e "From:ip-up@`hostname -f`\nTo:root@`hostname -f`\nSubject: $PPP_LOCAL\n`cat $file`" | /usr/sbin/sendmail root
|
||||
|
||||
rm -f $file
|
Reference in New Issue
Block a user