In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the "CentOS 7.0configuration mail regularly send svn log mail method", in the daily operation, I believe that many people in the CentOS 7.0configuration mail regularly send svn log mail on the method of doubt, editor consulted all kinds of information, sorted out a simple and easy to use method of operation, hope to answer the "CentOS 7.0configuration mail regularly send svn log mail method" of the doubt is helpful! Next, please follow the editor to study!
The company has set up a svn server, and now the need is to send svn log emails to the boss at a regular time every day, so configure it step by step.
Step 1: configure mail to send mail
1. Check whether mail is installed
2. Configure mail and add: in / etc/mail.rc:
Copy the contents to the clipboard
Set from= account smtp=smtp.exmail.qq.com
Set smtp-auth-user= user name
Smtp-auth-password= password smtp-auth=login
3, smtp configuration settings, I use qq enterprise mailbox here, take this as an example.
4. Test whether mail can be sent, echo content | mail-s title admin@jhonse.com
Step 2: get the svn version log
1. View svn log parameters
2. View the version log of the day
Copy the contents to the clipboard
Svn log-r {DATE}-v
Svn log-r {2015-11-25}: {2015-11-26}-v
3. SVN forces users to fill in log information
Add pre-commit under the hook directory
Copy the contents to the clipboard
REPOS= "$1"
TXN= "$2"
SVNLOOK=/usr/bin/svnlook
LOGMSG= `$SVNLOOK log-t "$TXN"$REPOS" | grep "[a-zA-Z0-9]" | wc-c`
If ["$LOGMSG"-lt 15]
Then
Echo "Log message can't be empty! you must input more than 15 chars as commentaries." 1 > & 2
Exit 1
Fi
Step 3: set up scheduled tasks
1. Create an execution file
Copy the contents to the clipboard
#! / bin/sh
# send svn log mail
Cd / *
/ usr/bin/svn log-r {$(date-d last-day +% Y-%m-%d)}: {$(date +% Y-%m-%d)}-v | mail-s svnLog_$ (date +% Y-%m-%d) admin@jhonse.com
2. Create a task
Copy the contents to the clipboard
Crontab-e
308 *. / usr/local/command/sendSvnLogMail.sh
3. View tasks
Crontab-l
At this point, on the "CentOS 7.0 configuration mail regularly send svn log mail method" on the end of the study, I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.