Remove deprecated scripts
This commit is contained in:
parent
db5c21f3f4
commit
1aa8cd7af6
@ -1,2 +0,0 @@
|
||||
root
|
||||
monkenix@gmail.com
|
@ -1 +0,0 @@
|
||||
root
|
@ -1,61 +0,0 @@
|
||||
#!/bin/bash
|
||||
PREVIP=$(cat /opt/utils/StoredIP)
|
||||
MAILFILE="Tempfile2"
|
||||
TRYCOUNT=10
|
||||
while [ TRUE ]; do
|
||||
|
||||
if [ $TRYCOUNT -le 0 ]; then
|
||||
echo Error occured.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CURRENTIP=$(curl --silent http://checkip.dyndns.org/|grep -Eo '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}')
|
||||
STATUS=$?
|
||||
sleep 5
|
||||
if [ ! $STATUS ]; then
|
||||
let TRYCOUNT-=1
|
||||
elif [ ! "$CURRENTIP" ]; then
|
||||
let TRYCOUNT-=1
|
||||
else
|
||||
break
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
if [ "$PREVIP" = "$CURRENTIP" ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
touch $MAILFILE
|
||||
exec 6>&1
|
||||
exec > $MAILFILE
|
||||
|
||||
|
||||
|
||||
echo This is an auto generated mail to notify the server IP had updated:
|
||||
echo 這是一封自動發送的電郵,以通知服務器地址經已更新:
|
||||
echo
|
||||
echo Server Address:
|
||||
echo 服務器地址:
|
||||
echo $CURRENTIP
|
||||
echo
|
||||
echo
|
||||
echo Pleas do not reply to this email.
|
||||
echo 請勿回覆。
|
||||
echo If you have any questions, please feel free to contact tgckpg@gmail.com
|
||||
echo 如有任何疑問,請電郵至tgckpg@gmail.com
|
||||
echo
|
||||
echo Regards,
|
||||
echo 祝 安康
|
||||
echo Penguin 鵬兄
|
||||
echo
|
||||
echo
|
||||
|
||||
echo $CURRENTIP > /opt/utils/StoredIP
|
||||
|
||||
while read line
|
||||
do mutt -s "通知Notice: 服務器地址已變更New address for server." -- $line < $MAILFILE
|
||||
done < /opt/utils/mailList
|
||||
rm $MAILFILE
|
||||
|
@ -1,79 +0,0 @@
|
||||
#!/bin/bash
|
||||
MAILFILE="Tempfile"
|
||||
|
||||
TRYCOUNT=10
|
||||
while [ TRUE ]; do
|
||||
|
||||
if [ $TRYCOUNT -le 0 ]; then
|
||||
echo Error occured.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CURRENTIP=$(curl --silent http://checkip.dyndns.org/|grep -Eo '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}')
|
||||
STATUS=$?
|
||||
sleep 5
|
||||
if [ ! $STATUS ]; then
|
||||
let TRYCOUNT-=1
|
||||
elif [ ! "$CURRENTIP" ]; then
|
||||
let TRYCOUNT-=1
|
||||
else
|
||||
break
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
|
||||
touch $MAILFILE
|
||||
exec 6>&1 # Link file descriptor #6 with stdout.
|
||||
# Saves stdout.
|
||||
exec > $MAILFILE # stdout replaced with file $LOGFILE.
|
||||
PSDDLEN=$(((RANDOM % 9) + 16))
|
||||
PASS=$( java -jar /opt/utils/pwgen.jar $PSDDLEN )
|
||||
htpasswd -b /var/auths/squid proxyuser $PASS
|
||||
|
||||
|
||||
echo This is an auto generated mail to notify the password had changed for the proxy server:
|
||||
echo 這是一封自動發送的電郵通知,密碼經已變更,登入時請使用新的密碼〔於「」內〕:
|
||||
echo Passward \(enclosed in 「」\):
|
||||
echo
|
||||
echo 「$PASS」
|
||||
echo
|
||||
echo
|
||||
echo Additional Information:
|
||||
echo 附加資訊:
|
||||
echo
|
||||
echo Server Address:
|
||||
echo 服務器地址:
|
||||
echo $CURRENTIP
|
||||
echo
|
||||
echo Server port:
|
||||
echo 服務器端口:
|
||||
echo
|
||||
echo 3128
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
echo Please be awared that the password will change for each week.
|
||||
echo 請留意密碼會每星期變更一次。
|
||||
echo
|
||||
echo
|
||||
echo Pleas do not reply to this email.
|
||||
echo 請勿回覆。
|
||||
echo If you have any questions, please feel free to contact tgckpg@gmail.com
|
||||
echo 如有任何疑問,請電郵至tgckpg@gmail.com
|
||||
echo
|
||||
echo Regards,
|
||||
echo 祝 安康
|
||||
echo Penguin 鵬兄
|
||||
echo
|
||||
echo
|
||||
echo Password Generator powered by Moonbird.
|
||||
|
||||
|
||||
while read line
|
||||
do mutt -s "通知Notice: 密碼已變更New pasword for squid proxy server." -- $line < $MAILFILE
|
||||
done < /opt/utils/mailListProxy
|
||||
|
||||
rm $MAILFILE
|
||||
|
Loading…
Reference in New Issue
Block a user