This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# crontab -l | |
# 00 3 * * * /usr/local/tlab/script/tomcat_log_del.bash tomcat_front > /dev/null 2>&1 | |
# | |
#---------- | |
# define. | |
#---------- | |
TOMCAT_UNIQ="${1:-tomcat}" | |
DIR_TOMCAT="/usr/local/${TOMCAT_UNIQ}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIR_IMAGE="/var/www/html/contents/" | |
CMD_FIND="/usr/bin/find" | |
CMD_XARGS="/usr/bin/xargs" | |
echo "### Self Heal Start. [${DIR_IMAGE}][time=`date +'%Y/%m/%d %H:%M:%S'`] ###" | |
${CMD_FIND} ${DIR_IMAGE} -noleaf -print0 | ${CMD_XARGS} --null stat > /dev/null | |
ret=$? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FL_CHECK=".health_check.html.`hostname`" | |
MESSAGE="" | |
LIST_MOUNT[0]="/var/www/html/contents" | |
ret=0 | |
flg_err=0 | |
for i in ${LIST_MOUNT[@]}; do | |
rm -f "${i}/${FL_CHECK}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MYSQL_DB="$1” | |
MYSQL_HOST=“${2:-localhost}” | |
MYSQL_PASS="${3:-password}" | |
mysql -u root -p${MYSQL_PASS} -h ${MYSQL_HOST} -s ${MYSQL_DB} -e "show tables;" | grep -v Tables_in_ | while read line; do | |
echo "== ${MYSQL_DB}.${line} =============================================================================" | |
mysql -u root -p${MYSQL_PASS} -h ${MYSQL_HOST} -s ${MYSQL_DB} -e "show create table ${MYSQL_DB}.${line};" | grep ENGINE | grep -v 'ENGINE=InnoDB' | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#------------------------------------------------------------------------------------------------------------------------ | |
# cron setting: | |
# */3 * * * * /root/resource.bash > /dev/null 2>&1 | |
#------------------------------------------------------------------------------------------------------------------------ | |
#------------------------------------------------------------------------------------------------------------------------ | |
# ENVIRONMENT | |
#------------------------------------------------------------------------------------------------------------------------ | |
DIR_LOG="/tmp/`basename $0 .bash`" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Chef::Config[:cookbook_path].each{|elem| | |
if File.exists?(File.join(elem, "/nginx/templates/default/", node['nginx']['template_dir'])) | |
conf_dir = File.join(elem, "/nginx/templates/default/", node['nginx']['template_dir']) | |
Dir.chdir conf_dir | |
confs = Dir::glob("**/*") | |
confs.each do |t| | |
if File::ftype("#{conf_dir}/#{t}") == "file" | |
template "/etc/nginx/#{t}" do | |
owner "root" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Settings in here override those in "Default/Preferences.sublime-settings", and | |
// are overridden in turn by file type specific settings. | |
{ | |
// カーソルのスタイル | |
"caret_style": "blink", | |
// フォント | |
//"font_face": "DejaVuSans", | |
// フォントサイズ | |
"font_size": 12.0, | |
// タブによる補完 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
export LANG=ja_JP.utf8 | |
REPOS="$1" | |
REV="$2" | |
# コミットユーザ | |
COMMIT_AUTOER=`svnlook author -r ${REV} ${REPOS}` | |
# コミットログ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/var/log/mysqld.log /var/lib/mysqld/*log { | |
daily | |
rotate 31 | |
dateext | |
missingok | |
postrotate | |
# just if mysqld is really running | |
if test -x /usr/bin/mysqladmin && \ | |
/usr/bin/mysqladmin -u <user> -p<password> ping &>/dev/null | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('Loading function.'); | |
const https = require('https'); | |
const url = require('url'); | |
const slack_url = 'https://hooks.slack.com/services/XXXXX'; // slack url | |
const slack_req_opts = url.parse(slack_url); | |
slack_req_opts.method = 'POST'; | |
slack_req_opts.headers = {'Content-Type': 'application/json'}; | |
exports.handler = function(event, context) { |
OlderNewer