shell脚本分割svn日志
#!/bin/sh #Created by rocdk890 log_path="/var/log/" #日志记录的目录地址 log_file="svn.log" #默认日志文件名称 log_file_new=${log_path}${log_file}-$(date +%Y%m%d)...
#!/bin/sh #Created by rocdk890 log_path="/var/log/" #日志记录的目录地址 log_file="svn.log" #默认日志文件名称 log_file_new=${log_path}${log_file}-$(date +%Y%m%d)...
这篇文章在原作者的代码基础上稍微进行了下修改,让其完全满足我们svn结构的,使其能够远程同步到另外一台服务器上.
svn服务器ip:10.168.227.xx
项目web服务器:10.27.2.xx
svn代码库:svn://10.168.227.xx/slogra/branches/dev_whdysp2017spring/
项目web服务器代码根目录:/data/www/vhosts
先来看svn钩子里的内容:
cd /home/svn/slogra/hooks/
vi post-commit
...
#!/bin/bash mysql_user="root" mysql_pass="password" my...
#!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:~/bin export PATH # Check if user is root if [ $(id -u) != "0" ]; then ech...
#!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:~/bin export PATH # Check if user is root if [ $(id -u) != "0" ]; then echo "Error: You must ...
#!/bin/bash PATH=/bin:/sbin:/us...
#!/bin/bash LOCK_NAME="/tmp/my.lock" if ( set -o noclobber; echo "$$" > "$LOCK_NAME") 2> /dev/null; then trap 'rm -f "$LOCK_NAME"; exit $?' INT TE...
#!/bin/bash # -*- coding: UTF-8 -*- ############################################# #作者网名:Sunny # #作者博客:www.sunnyos.com ...
#!/bin/bash # 删除mysql中所有表 # 示例: # Usage: ./script user password dbnane # Usage: ./script user password...
#!/bin/bash #install haproxy #20160224 by rocdk890 #variables dir=/usr/local ha_dir=${dir}/haproxy ha_cfg=${ha_dir}/conf/haproxy.cfg ha_init=/etc/init.d/haproxy ker...
#!/bin/bash # By rocdk890 # https://blog.slogra.com #Check the network is online read -p "Enter your network segment(example 192.168.1.):" ip_num echo "Please wait..." for i in...
#!/bin/bash # ID 201510192126 # Author Ricky # E-mail 564001002@qq.com # CentOS 6 系统初始优化脚本 # version 1.1.0 # 检查是否为root用户,脚本必须在root权限下运行 # if [[ "$(whoami)" != "root" ]]; then echo "please run this script as root !" >&2 exit 1 fi echo -e "\033[31m the script only Support CentOS_6 x86_64 \033[0m" echo -e "\033[31m system initialization script, Please Seriously. press ctrl+C to cancel \033[0m" # 按Y继续默认N,其他按键全部退出...
今天发现了个不错的东西,Linux之劫持rm命令实现安全删除和屏蔽删除/、/*,发给群里居然还有人因为不会用而说不好,让我很是不爽,下面分享给大家,怎么使用请自己摸索,简单的东西就不想当保姆教了.
下载地址:
wget http://www.dwhd.org/script/securityremove.sh
或者
wget http://download.slogra.com/soft_shell/securityremove.sh
securityremove脚本内容:
#!/bin/bash ######################################################################### # File Name: securityremove.sh # Author: LookBack # Email: admin#dwhd.org # Version: # Created Time: 2015年08月16日 星期日 01时47分37秒 ######################################################################### wget -q http://www.dwhd.org/script/securityremove -O /bin/securityremove chmod 755 /bin/securityremove...