crontabで10秒おきに処理を実行するためのスクリプト雛形 単純に処理を実行して10秒スリープを6回繰り返す感じです #!/bin/sh source /root/.bash_profile START=`date "+%s"` LOCK_FILE=subcr… 高瀬 裕介ハック2013.07.12 540
Tomcatで同一セッションからの連続アクセスを制限するフィルタ package com.yourdomain.filter; import java.io.IOException; import java.util.Date; import javax.servlet.Filter;… 高瀬 裕介ハック2013.07.10 1,136
Apache2で起動時にSSL証明書の秘密鍵のパスフレーズを自動入力する設定 /etc/httpd/conf.d/ssl.conf # Pass Phrase Dialog: # Configure the pass phrase gathering process. # The filterin… 高瀬 裕介ハック2013.07.09 1,337
Apache2でSSIを使うための設定 httpd.conf AddType text/html .shtml AddOutputFilter INCLUDES .shtml DirectoryディレクティブでOptionにincludesを入れるのも忘れずに… 高瀬 裕介ハック2013.07.08 468
VPSでrootで直接SSHログインできなくする # adduser admin # passwd admin # usermod -G wheel admin # vi /etc/pam.d/su #auth required pam_wheel.so use_uid… 高瀬 裕介ハック2013.07.05 283
Tomcatのサービスが異常終了していたら起動コマンドを実行するスクリプト vim /root/scripts/watchTomcat.sh #!/bin/sh source /root/.bash_profile /sbin/service tomcat6 status if [ $? -eq… 高瀬 裕介ハック2013.07.04 1,258
ソースコンパイルしたPostgreSQLのデーモン起動用スクリプト /etc/init.d/mypostgres #!/bin/sh # # PostgreSQL start and shutdown script # # chkconfig: 345 90 11 # descripti… 高瀬 裕介ハック2013.07.03 421