#! /Bin/shlang = zh_cnsendmsgfile =/home/LSC/fetion/install/cmd.txt send_sms_mobile_telephone () {log_time = 'cat ftpstat_time 'local_time = 'date + % s' n =n ($ {local_time}-$ {log_time })) if ["$ N"-GT "1800"]; then # is more than 30 minutes away from the last alert message sent. You can send it again. Echo $ local_time> ftpstat_time echo "SMS 0 $ {MSG}"> $ sendmsgfile echo "exit"> $ sendmsgfile/home/LSC/fetion/install/fetion-u mobile phone number- the password "P fetion password-en-B $ sendmsgfile else echo" is less than 30 minutes away from the last alert message sent. "Fi} If wget-T 3-T 3 -- spider ftp: // test: Test password @ 127.0.0.1/ftpstat>/dev/null 2> & 1; then ECHO "FTP normal" else/usr/local/sbin/pure-config.pl/usr/local/etc/pure-ftpd.conf sleep 10 # delay 10 seconds if wget-T 3-T 3 -- spider FTP: // test: Test password @ 127.0.0.1/ftpstat>/dev/null 2> & 1; then MSG = "Server IP address alert: the FTP server cannot be logged on and has been started successfully. (The test connection account is used for monitoring ). "Send_sms_mobile_telephone else MSG =" Server IP address alert: the FTP server cannot be logged on, and the attempt to start the server fails. (The test connection account is used for monitoring ). "Send_sms_mobile_telephone Fifi